ieee802_11_mgmt: Handle frame info more consistently
Check for the fi parameter to be non-NULL before trying to fetch the ssi_signal information similarly to how the fi->freq was already handled. While the meta information is supposed to be available, it looks like there is at least one corner case where fi == NULL could be used (Authentication frame reprocessing after RADIUS-based ACL). Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
458d8984de
commit
659ac96d7f
1 changed files with 3 additions and 2 deletions
|
@ -3829,6 +3829,7 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
|
|||
u16 fc, stype;
|
||||
int ret = 0;
|
||||
unsigned int freq;
|
||||
int ssi_signal = fi ? fi->ssi_signal : 0;
|
||||
|
||||
if (len < 24)
|
||||
return 0;
|
||||
|
@ -3864,7 +3865,7 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
|
|||
|
||||
|
||||
if (stype == WLAN_FC_STYPE_PROBE_REQ) {
|
||||
handle_probe_req(hapd, mgmt, len, fi->ssi_signal);
|
||||
handle_probe_req(hapd, mgmt, len, ssi_signal);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -3879,7 +3880,7 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
|
|||
}
|
||||
|
||||
if (hapd->iconf->track_sta_max_num)
|
||||
sta_track_add(hapd->iface, mgmt->sa, fi->ssi_signal);
|
||||
sta_track_add(hapd->iface, mgmt->sa, ssi_signal);
|
||||
|
||||
switch (stype) {
|
||||
case WLAN_FC_STYPE_AUTH:
|
||||
|
|
Loading…
Reference in a new issue