Acct-Delay-Time missing with RADIUS accounting
Jouni Malinen
j at w1.fi
Mon Feb 29 02:10:07 PST 2016
On Mon, Feb 22, 2016 at 09:40:10PM +0000, Nick Lowe wrote:
> I am not convinced that an Acct-Delay-Time attribute value should be
> anything other than 0 where the contents of the Interim-Update are
> refreshed to current information.
We can do following for interim updates. Need to think a bit more about
Acct-Delay-Time in other accounting messages (with the need to update
Identifier and Request Authenticator).
[PATCH] RADIUS: Add Acct-Delay-Time 0 to interim accounting updates
Since these messages do not use RADIUS client retransmission mechanism
anymore, we can indicate zero Acct-Delay-Time to the server.
Signed-off-by: Jouni Malinen <j at w1.fi>
---
src/ap/accounting.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/ap/accounting.c b/src/ap/accounting.c
index 010ba05..b400938 100644
--- a/src/ap/accounting.c
+++ b/src/ap/accounting.c
@@ -332,6 +332,20 @@ static void accounting_sta_report(struct hostapd_data *hapd,
}
}
+ if (!stop) {
+ /*
+ * Since we do not retry the same message again for interim
+ * updates, indicate that this specific message has no delay in
+ * transmission attempts.
+ */
+ if (!radius_msg_add_attr_int32(msg,
+ RADIUS_ATTR_ACCT_DELAY_TIME,
+ 0)) {
+ wpa_printf(MSG_INFO, "Could not add Acct-Delay-Time");
+ goto fail;
+ }
+ }
+
if (eloop_terminated())
cause = RADIUS_ACCT_TERMINATE_CAUSE_ADMIN_REBOOT;
--
1.9.1
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list