aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Wetzel <alexander@wetzel-home.de>2020-03-04 17:16:50 (GMT)
committerJouni Malinen <j@w1.fi>2020-03-04 22:03:56 (GMT)
commitd37c05e5b5bf239d4405f73e079f82bd3166df37 (patch)
treedc4efbd9086af12634445b82dbecfb55496de121
parentfa1a6aff223aebf8c74d34e32e1bb3e42b28aeab (diff)
downloadhostap-d37c05e5b5bf239d4405f73e079f82bd3166df37.zip
hostap-d37c05e5b5bf239d4405f73e079f82bd3166df37.tar.gz
hostap-d37c05e5b5bf239d4405f73e079f82bd3166df37.tar.bz2
AP: Don't try to set NULL WEP default key
hostapd_broadcast_wep_set() can be called without a WEP key set. Don't try to install a default key in that case. This patch is not critical for the new API. With key_flag we just would report an (ignored) error and do nothing. With the patch we simply do nothing. Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
-rw-r--r--src/ap/hostapd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index a6a95de..f2e964a 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -336,7 +336,7 @@ static int hostapd_broadcast_wep_set(struct hostapd_data *hapd)
struct hostapd_ssid *ssid = &hapd->conf->ssid;
idx = ssid->wep.idx;
- if (ssid->wep.default_len &&
+ if (ssid->wep.default_len && ssid->wep.key[idx] &&
hostapd_drv_set_key(hapd->conf->iface,
hapd, WPA_ALG_WEP, broadcast_ether_addr, idx, 0,
1, NULL, 0, ssid->wep.key[idx],