|
@@ -15,6 +15,8 @@
|
|
|
#include "radius/radius_client.h"
|
|
|
#include "radius/radius_das.h"
|
|
|
#include "eap_server/tncs.h"
|
|
|
+#include "eapol_auth/eapol_auth_sm.h"
|
|
|
+#include "eapol_auth/eapol_auth_sm_i.h"
|
|
|
#include "hostapd.h"
|
|
|
#include "authsrv.h"
|
|
|
#include "sta_info.h"
|
|
@@ -673,6 +675,42 @@ static struct sta_info * hostapd_das_find_sta(struct hostapd_data *hapd,
|
|
|
wpa_printf(MSG_DEBUG, "RADIUS DAS: Acct-Session-Id match");
|
|
|
}
|
|
|
|
|
|
+ if (attr->acct_multi_session_id) {
|
|
|
+ num_attr++;
|
|
|
+ if (attr->acct_multi_session_id_len != 17) {
|
|
|
+ wpa_printf(MSG_DEBUG,
|
|
|
+ "RADIUS DAS: Acct-Multi-Session-Id cannot match");
|
|
|
+ return NULL;
|
|
|
+ }
|
|
|
+ count = 0;
|
|
|
+
|
|
|
+ for (sta = hapd->sta_list; sta; sta = sta->next) {
|
|
|
+ if (!sta->radius_das_match)
|
|
|
+ continue;
|
|
|
+ if (!sta->eapol_sm ||
|
|
|
+ !sta->eapol_sm->acct_multi_session_id_hi) {
|
|
|
+ sta->radius_das_match = 0;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ os_snprintf(buf, sizeof(buf), "%08X+%08X",
|
|
|
+ sta->eapol_sm->acct_multi_session_id_hi,
|
|
|
+ sta->eapol_sm->acct_multi_session_id_lo);
|
|
|
+ if (os_memcmp(attr->acct_multi_session_id, buf, 17) !=
|
|
|
+ 0)
|
|
|
+ sta->radius_das_match = 0;
|
|
|
+ else
|
|
|
+ count++;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (count == 0) {
|
|
|
+ wpa_printf(MSG_DEBUG,
|
|
|
+ "RADIUS DAS: No matches remaining after Acct-Multi-Session-Id check");
|
|
|
+ return NULL;
|
|
|
+ }
|
|
|
+ wpa_printf(MSG_DEBUG,
|
|
|
+ "RADIUS DAS: Acct-Multi-Session-Id match");
|
|
|
+ }
|
|
|
+
|
|
|
if (attr->cui) {
|
|
|
num_attr++;
|
|
|
count = 0;
|