wpa_supplicant AP: Make sure deauth/disassoc event is valid
Verify that the driver wrapper is using a valid deauth/disassoc event before dereferencing the addr pointer. The address is required to be set in AP mode, but it is safer to verify this here than to trust on all driver wrappers doing the correct thing.
This commit is contained in:
parent
cce1f698e5
commit
7f5420691e
1 changed files with 2 additions and 2 deletions
|
@ -1500,7 +1500,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
|||
MAC2STR(data->disassoc_info.addr));
|
||||
}
|
||||
#ifdef CONFIG_AP
|
||||
if (wpa_s->ap_iface && data) {
|
||||
if (wpa_s->ap_iface && data && data->disassoc_info.addr) {
|
||||
hostapd_notif_disassoc(wpa_s->ap_iface->bss[0],
|
||||
data->disassoc_info.addr);
|
||||
break;
|
||||
|
@ -1527,7 +1527,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
|||
}
|
||||
}
|
||||
#ifdef CONFIG_AP
|
||||
if (wpa_s->ap_iface && data) {
|
||||
if (wpa_s->ap_iface && data && data->deauth_info.addr) {
|
||||
hostapd_notif_disassoc(wpa_s->ap_iface->bss[0],
|
||||
data->deauth_info.addr);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue