git: 58e26f659ee7 - main - net/freeradius3: Fix crash, bump PORTREVISION
Ryan Steinmetz
zi at FreeBSD.org
Fri Jul 16 14:18:23 UTC 2021
The branch main has been updated by zi:
URL: https://cgit.FreeBSD.org/ports/commit/?id=58e26f659ee7fca73abd3b0c39691120d991f409
commit 58e26f659ee7fca73abd3b0c39691120d991f409
Author: Ryan Steinmetz <zi at FreeBSD.org>
AuthorDate: 2021-07-16 14:17:16 +0000
Commit: Ryan Steinmetz <zi at FreeBSD.org>
CommitDate: 2021-07-16 14:17:53 +0000
net/freeradius3: Fix crash, bump PORTREVISION
---
net/freeradius3/Makefile | 1 +
net/freeradius3/files/patch-src__main__state.c | 86 ++++++++++++++++++++++++++
net/freeradius3/pkg-plist | 2 +
3 files changed, 89 insertions(+)
diff --git a/net/freeradius3/Makefile b/net/freeradius3/Makefile
index 27ab27245b06..27dd69f6ea16 100644
--- a/net/freeradius3/Makefile
+++ b/net/freeradius3/Makefile
@@ -2,6 +2,7 @@
PORTNAME= freeradius
DISTVERSION= 3.0.23
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= ftp://ftp.freeradius.org/pub/freeradius/%SUBDIR%/ \
ftp://ftp.ntua.gr/pub/net/radius/freeradius/%SUBDIR%/ \
diff --git a/net/freeradius3/files/patch-src__main__state.c b/net/freeradius3/files/patch-src__main__state.c
new file mode 100644
index 000000000000..ea33f43de798
--- /dev/null
+++ b/net/freeradius3/files/patch-src__main__state.c
@@ -0,0 +1,86 @@
+--- src/main/state.c.orig
++++ src/main/state.c
+@@ -311,15 +311,30 @@ static state_entry_t *fr_state_cleanup_find(fr_state_t *state)
+ continue;
+ }
+
++ /*
++ * Not yet time to clean it up.
++ */
++ if (entry->cleanup > now) {
++ continue;
++ }
++
++ /*
++ * We're not running the "client lost" section.
++ * Just nuke the entry now.
++ */
++ if (!main_config.postauth_client_lost) {
++ state_entry_free(state, entry);
++ continue;
++ }
++
+ /*
+ * Old enough that the request has been removed.
+ * We can add it to the cleanup list.
+ */
+- if (entry->cleanup < now) {
+- (*tail) = entry;
+- state_entry_unlink(state, entry);
+- tail = &entry->next;
+- }
++ state_entry_unlink(state, entry);
++ entry->next = NULL;
++ (*tail) = entry;
++ tail = &entry->next;
+ }
+
+ return head;
+@@ -335,30 +349,28 @@ static void fr_state_cleanup(state_entry_t *head)
+ if (!head) return;
+
+ for (entry = head; entry != NULL; entry = next) {
+- next = entry->next;
++ REQUEST *request;
+
+- if (main_config.postauth_client_lost) {
+- REQUEST *request;
++ next = entry->next;
+
+- request = fr_state_cleanup_request(entry);
+- if (request) {
+- RDEBUG2("No response from client, cleaning up expired state");
+- RDEBUG2("Restoring &session-state");
++ request = fr_state_cleanup_request(entry);
++ if (request) {
++ RDEBUG2("No response from client, cleaning up expired state");
++ RDEBUG2("Restoring &session-state");
+
+- /*
+- * @todo - print out message
+- * saying where the handler was
+- * in the process? i.e. "sent
+- * server cert", etc. This will
+- * require updating the EAP code
+- * to put a new attribute into
+- * the session state list.
+- */
++ /*
++ * @todo - print out message
++ * saying where the handler was
++ * in the process? i.e. "sent
++ * server cert", etc. This will
++ * require updating the EAP code
++ * to put a new attribute into
++ * the session state list.
++ */
+
+- rdebug_pair_list(L_DBG_LVL_2, request, request->state, "&session-state:");
++ rdebug_pair_list(L_DBG_LVL_2, request, request->state, "&session-state:");
+
+- request_inject(request);
+- }
++ request_inject(request);
+ }
+
+ talloc_free(entry);
diff --git a/net/freeradius3/pkg-plist b/net/freeradius3/pkg-plist
index 2c361f42b761..1493f6d54d21 100644
--- a/net/freeradius3/pkg-plist
+++ b/net/freeradius3/pkg-plist
@@ -816,6 +816,7 @@ sbin/radmin
%%EXAMPLESDIR%%/raddb/mods-enabled/replicate
%%EXAMPLESDIR%%/raddb/mods-enabled/soh
%%EXAMPLESDIR%%/raddb/mods-enabled/sradutmp
+%%EXAMPLESDIR%%/raddb/mods-enabled/totp
%%EXAMPLESDIR%%/raddb/mods-enabled/unix
%%EXAMPLESDIR%%/raddb/mods-enabled/unpack
%%EXAMPLESDIR%%/raddb/mods-enabled/utf8
@@ -858,6 +859,7 @@ sbin/radmin
%%EXAMPLESDIR%%/raddb/sites-available/robust-proxy-accounting
%%EXAMPLESDIR%%/raddb/sites-available/soh
%%EXAMPLESDIR%%/raddb/sites-available/status
+%%EXAMPLESDIR%%/raddb/sites-available/totp
%%EXAMPLESDIR%%/raddb/sites-available/tls
%%EXAMPLESDIR%%/raddb/sites-available/virtual.example.com
%%EXAMPLESDIR%%/raddb/sites-available/vmps
More information about the dev-commits-ports-all
mailing list