Send an Acct-Multi-Session-Id attribute in Access-Request packets

Previously, this was included only in Accounting-Request packets.

Signed-off-by: Nick Lowe <nick.lowe@lugatech.com>
This commit is contained in:
Nick Lowe 2016-01-25 16:49:59 +00:00 committed by Jouni Malinen
parent 4260e1a1ff
commit b71a64aa01
2 changed files with 15 additions and 15 deletions

View file

@ -52,21 +52,6 @@ static struct radius_msg * accounting_msg(struct hostapd_data *hapd,
if (sta) { if (sta) {
radius_msg_make_authenticator(msg, (u8 *) sta, sizeof(*sta)); radius_msg_make_authenticator(msg, (u8 *) sta, sizeof(*sta));
if ((hapd->conf->wpa & 2) &&
!hapd->conf->disable_pmksa_caching &&
sta->eapol_sm && sta->eapol_sm->acct_multi_session_id) {
os_snprintf(buf, sizeof(buf), "%016lX",
(long unsigned int)
sta->eapol_sm->acct_multi_session_id);
if (!radius_msg_add_attr(
msg, RADIUS_ATTR_ACCT_MULTI_SESSION_ID,
(u8 *) buf, os_strlen(buf))) {
wpa_printf(MSG_INFO,
"Could not add Acct-Multi-Session-Id");
goto fail;
}
}
} else { } else {
radius_msg_make_authenticator(msg, (u8 *) hapd, sizeof(*hapd)); radius_msg_make_authenticator(msg, (u8 *) hapd, sizeof(*hapd));
} }

View file

@ -448,6 +448,21 @@ static int add_common_radius_sta_attr(struct hostapd_data *hapd,
} }
} }
if ((hapd->conf->wpa & 2) &&
!hapd->conf->disable_pmksa_caching &&
sta->eapol_sm && sta->eapol_sm->acct_multi_session_id) {
os_snprintf(buf, sizeof(buf), "%016lX",
(long unsigned int)
sta->eapol_sm->acct_multi_session_id);
if (!radius_msg_add_attr(
msg, RADIUS_ATTR_ACCT_MULTI_SESSION_ID,
(u8 *) buf, os_strlen(buf))) {
wpa_printf(MSG_INFO,
"Could not add Acct-Multi-Session-Id");
return -1;
}
}
#ifdef CONFIG_IEEE80211R #ifdef CONFIG_IEEE80211R
if (hapd->conf->wpa && wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt) && if (hapd->conf->wpa && wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt) &&
sta->wpa_sm && sta->wpa_sm &&