fail:
radius_msg_free(msg);
- os_free(msg);
return -1;
}
#endif /* CONFIG_NO_RADIUS */
struct hostapd_data *hapd = data;
struct hostapd_acl_query_data *query, *prev;
struct hostapd_cached_radius_acl *cache;
+ struct radius_hdr *hdr = radius_msg_get_hdr(msg);
query = hapd->acl_queries;
prev = NULL;
while (query) {
- if (query->radius_id == msg->hdr->identifier)
+ if (query->radius_id == hdr->identifier)
break;
prev = query;
query = query->next;
return RADIUS_RX_INVALID_AUTHENTICATOR;
}
- if (msg->hdr->code != RADIUS_CODE_ACCESS_ACCEPT &&
- msg->hdr->code != RADIUS_CODE_ACCESS_REJECT) {
+ if (hdr->code != RADIUS_CODE_ACCESS_ACCEPT &&
+ hdr->code != RADIUS_CODE_ACCESS_REJECT) {
wpa_printf(MSG_DEBUG, "Unknown RADIUS message code %d to ACL "
- "query", msg->hdr->code);
+ "query", hdr->code);
return RADIUS_RX_UNKNOWN;
}
}
time(&cache->timestamp);
os_memcpy(cache->addr, query->addr, sizeof(cache->addr));
- if (msg->hdr->code == RADIUS_CODE_ACCESS_ACCEPT) {
+ if (hdr->code == RADIUS_CODE_ACCESS_ACCEPT) {
if (radius_msg_get_attr_int32(msg, RADIUS_ATTR_SESSION_TIMEOUT,
&cache->session_timeout) == 0)
cache->accepted = HOSTAPD_ACL_ACCEPT_TIMEOUT;
/* Re-send original authentication frame for 802.11 processing */
wpa_printf(MSG_DEBUG, "Re-sending authentication frame after "
"successful RADIUS ACL query");
- ieee802_11_mgmt(hapd, query->auth_msg, query->auth_msg_len,
- WLAN_FC_STYPE_AUTH, NULL);
+ ieee802_11_mgmt(hapd, query->auth_msg, query->auth_msg_len, NULL);
#endif /* NEED_AP_MLME */
#endif /* CONFIG_DRIVER_RADIUS_ACL */
}
}
-
-int hostapd_acl_reconfig(struct hostapd_data *hapd,
- struct hostapd_config *oldconf)
-{
- if (!hapd->radius_client_reconfigured)
- return 0;
-
- hostapd_acl_deinit(hapd);
- return hostapd_acl_init(hapd);
-}
-
#endif /* CONFIG_NATIVE_WINDOWS */