Message ID | 1381391336-27457-1-git-send-email-helmut.schaa@googlemail.com |
---|---|
State | Accepted |
Commit | ded22b5390cba3dcb28ef590acba203fd0117d70 |
Headers | show |
On Thu, Oct 10, 2013 at 09:48:56AM +0200, Helmut Schaa wrote: > When hostapd receives an auth frame during ACS the transmission of > the according auth response will always fail: ... > Fix this by not presuming anything about the initialization state of > hapd and checking ->radius before accessing. Thanks, applied. > Actually, this is more a workaround then a proper fix since I think > hostapd should not accept any mgmt frames during ACS and as such the > STA list should always be empty. However, accessing anything outside > the scope of a single sta_info from ap_free_sta should be protected by > a NULL check. Agreed.
diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c index 6704c09..016b9b6 100644 --- a/src/ap/sta_info.c +++ b/src/ap/sta_info.c @@ -232,7 +232,8 @@ void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta) wpa_auth_sta_deinit(sta->wpa_sm); rsn_preauth_free_station(hapd, sta); #ifndef CONFIG_NO_RADIUS - radius_client_flush_auth(hapd->radius, sta->addr); + if (hapd->radius) + radius_client_flush_auth(hapd->radius, sta->addr); #endif /* CONFIG_NO_RADIUS */ os_free(sta->last_assoc_req);