Add Acct-Session-Id into Access-Request messages
This optional attribute may make it easier to bind together the Access-Request and Accounting-Request messages. The accounting session identifier is now generated when the STA associates instead of waiting for the actual session to start after successfull authentication. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
2ec535fd37
commit
8b24861154
4 changed files with 18 additions and 4 deletions
|
@ -454,6 +454,16 @@ static int add_common_radius_sta_attr(struct hostapd_data *hapd,
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (sta->acct_session_id_hi || sta->acct_session_id_lo) {
|
||||
os_snprintf(buf, sizeof(buf), "%08X-%08X",
|
||||
sta->acct_session_id_hi, sta->acct_session_id_lo);
|
||||
if (!radius_msg_add_attr(msg, RADIUS_ATTR_ACCT_SESSION_ID,
|
||||
(u8 *) buf, os_strlen(buf))) {
|
||||
wpa_printf(MSG_ERROR, "Could not add Acct-Session-Id");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue