radius: when sending accounting information include any updated IP

This commit is contained in:
Nikos Mavrogiannopoulos
2015-02-23 09:34:06 +01:00
parent 551e3b38c5
commit 88e008cda3
5 changed files with 15 additions and 3 deletions
+8 -1
View File
@@ -400,6 +400,10 @@ static void append_acct_standard(struct radius_ctx_st * pctx, rc_handle *rh,
}
}
if (rc_avpair_add(rh, send, PW_CALLING_STATION_ID, pctx->remote_ip, -1, 0) == NULL) {
return;
}
if (rc_avpair_add(rh, send, PW_ACCT_SESSION_ID, pctx->sid, -1, 0) == NULL) {
return;
}
@@ -417,13 +421,16 @@ static void append_acct_standard(struct radius_ctx_st * pctx, rc_handle *rh,
return;
}
static void radius_auth_session_stats(void* ctx, stats_st *stats)
static void radius_auth_session_stats(void* ctx, stats_st *stats, const char *ip)
{
struct radius_ctx_st * pctx = ctx;
int ret;
uint32_t status_type;
VALUE_PAIR *send = NULL, *recvd = NULL;
if (ip)
strlcpy(pctx->remote_ip, ip, sizeof(pctx->remote_ip));
status_type = PW_STATUS_ALIVE;
syslog(LOG_DEBUG, "radius-auth: sending session interim update");