mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-29 16:24:03 -05:00
Fix hostapd SIGHUP processing before interface is enabled
It was possible to try to do driver operations before the driver interface had been initialized when processing a SIGHUP signal. This would result in NULL pointer dereference. Fix this by skipping the steps when SIGHUP is issued before the interface is enabled. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
8f49787897
commit
1dfd25a68a
@ -75,6 +75,9 @@ static void hostapd_reload_bss(struct hostapd_data *hapd)
|
||||
{
|
||||
struct hostapd_ssid *ssid;
|
||||
|
||||
if (!hapd->started)
|
||||
return;
|
||||
|
||||
#ifndef CONFIG_NO_RADIUS
|
||||
radius_client_reconfig(hapd->radius, hapd->conf->radius);
|
||||
#endif /* CONFIG_NO_RADIUS */
|
||||
@ -210,7 +213,7 @@ static void hostapd_broadcast_key_clear_iface(struct hostapd_data *hapd,
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!ifname)
|
||||
if (!ifname || !hapd->drv_priv)
|
||||
return;
|
||||
for (i = 0; i < NUM_WEP_KEYS; i++) {
|
||||
if (hostapd_drv_set_key(ifname, hapd, WPA_ALG_NONE, NULL, i,
|
||||
|
Loading…
Reference in New Issue
Block a user