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
1 changed files with 4 additions and 1 deletions
|
@ -75,6 +75,9 @@ static void hostapd_reload_bss(struct hostapd_data *hapd)
|
||||||
{
|
{
|
||||||
struct hostapd_ssid *ssid;
|
struct hostapd_ssid *ssid;
|
||||||
|
|
||||||
|
if (!hapd->started)
|
||||||
|
return;
|
||||||
|
|
||||||
#ifndef CONFIG_NO_RADIUS
|
#ifndef CONFIG_NO_RADIUS
|
||||||
radius_client_reconfig(hapd->radius, hapd->conf->radius);
|
radius_client_reconfig(hapd->radius, hapd->conf->radius);
|
||||||
#endif /* CONFIG_NO_RADIUS */
|
#endif /* CONFIG_NO_RADIUS */
|
||||||
|
@ -210,7 +213,7 @@ static void hostapd_broadcast_key_clear_iface(struct hostapd_data *hapd,
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!ifname)
|
if (!ifname || !hapd->drv_priv)
|
||||||
return;
|
return;
|
||||||
for (i = 0; i < NUM_WEP_KEYS; i++) {
|
for (i = 0; i < NUM_WEP_KEYS; i++) {
|
||||||
if (hostapd_drv_set_key(ifname, hapd, WPA_ALG_NONE, NULL, i,
|
if (hostapd_drv_set_key(ifname, hapd, WPA_ALG_NONE, NULL, i,
|
||||||
|
|
Loading…
Reference in a new issue