It could simply be that the accounting server is temporarily down, and
any good accounting server should be able to recover from missed
start/stop frames. In particular Acct-Session-Time on the first seen
interim update or even stop frame allows for determining start time.
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
Co-authored-by: Jaco Kroon <jaco@iewc.co.za>
#endif
struct radius_state {
#endif
struct radius_state {
- int accounting_started;
int initialized;
int client_port;
int choose_ip;
int initialized;
int client_port;
int choose_ip;
/* RADIUS server could be down so make this a warning */
syslog(LOG_WARNING,
"Accounting START failed for %s", rstate.user);
/* RADIUS server could be down so make this a warning */
syslog(LOG_WARNING,
"Accounting START failed for %s", rstate.user);
- } else {
- rstate.accounting_started = 1;
- /* Kick off periodic accounting reports */
- if (rstate.acct_interim_interval) {
- TIMEOUT(radius_acct_interim, NULL, rstate.acct_interim_interval);
- }
+ }
+
+ /* Kick off periodic accounting reports */
+ if (rstate.acct_interim_interval) {
+ TIMEOUT(radius_acct_interim, NULL, rstate.acct_interim_interval);
- if (!rstate.accounting_started) {
- return;
- }
-
if (rstate.acct_interim_interval)
UNTIMEOUT(radius_acct_interim, NULL);
if (rstate.acct_interim_interval)
UNTIMEOUT(radius_acct_interim, NULL);
- rstate.accounting_started = 0;
rc_avpair_add(&send, PW_ACCT_SESSION_ID, rstate.session_id,
0, VENDOR_NONE);
rc_avpair_add(&send, PW_ACCT_SESSION_ID, rstate.session_id,
0, VENDOR_NONE);
- if (!rstate.accounting_started) {
- return;
- }
-
rc_avpair_add(&send, PW_ACCT_SESSION_ID, rstate.session_id,
0, VENDOR_NONE);
rc_avpair_add(&send, PW_ACCT_SESSION_ID, rstate.session_id,
0, VENDOR_NONE);