Accounting requests are ignored when TCP connection mode is used. Following fix fixes the issue, is it possible to take this to one of the releases? diff --git a/src/main/listen.c b/src/main/listen.c index 19d22a24fd..0bd88cdde0 100644 --- a/src/main/listen.c +++ b/src/main/listen.c @@ -575,7 +575,16 @@ static int dual_tcp_recv(rad_listen_t *listener) #ifdef WITH_ACCOUNTING case PW_CODE_ACCOUNTING_REQUEST: - if (listener->type != RAD_LISTEN_ACCT) goto bad_packet; + if (listener->type != RAD_LISTEN_ACCT) { + /* + * Allow auth + dual. Disallow + * everything else. + */ + if (!((listener->type == RAD_LISTEN_AUTH) && + (listener->dual))) { + goto bad_packet; + } + } FR_STATS_INC(acct, total_requests); fun = rad_accounting; break; Thanks Natarajan
On May 4, 2023, at 6:41 PM, Natarajan M <natarajan.m@gmail.com> wrote:
Accounting requests are ignored when TCP connection mode is used. Following fix fixes the issue, is it possible to take this to one of the releases?
It's easiest to review patches, etc. via GitHub. You can open a pull request there. It also means that the patch is associated with a branch. You didn't say which branch this patch was for, which would be useful. I've double-checked v3.0.x, and pulled a patch over. Alan DeKok.
Thanks for merging the fix. For the other two will support PRs. On Thu, May 4, 2023 at 9:41 AM Natarajan M <natarajan.m@gmail.com> wrote:
Accounting requests are ignored when TCP connection mode is used. Following fix fixes the issue, is it possible to take this to one of the releases?
diff --git a/src/main/listen.c b/src/main/listen.c
index 19d22a24fd..0bd88cdde0 100644
--- a/src/main/listen.c
+++ b/src/main/listen.c
@@ -575,7 +575,16 @@ static int dual_tcp_recv(rad_listen_t *listener)
#ifdef WITH_ACCOUNTING
case PW_CODE_ACCOUNTING_REQUEST:
- if (listener->type != RAD_LISTEN_ACCT) goto bad_packet;
+ if (listener->type != RAD_LISTEN_ACCT) {
+ /*
+ * Allow auth + dual. Disallow
+ * everything else.
+ */
+ if (!((listener->type == RAD_LISTEN_AUTH) &&
+ (listener->dual))) {
+ goto bad_packet;
+ }
+ }
FR_STATS_INC(acct, total_requests);
fun = rad_accounting;
break;
Thanks Natarajan
participants (2)
-
Alan DeKok -
Natarajan M