]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - src/drivers/driver_nl80211.c
nl80211: Fix key configuration in wpa_supplicant AP mode
[thirdparty/hostap.git] / src / drivers / driver_nl80211.c
index d8132144406164ed17571df073584cb55eaf2677..a06fa843554ee681f08e8dc45d435fdfede98083 100644 (file)
@@ -2072,9 +2072,12 @@ static int wpa_driver_nl80211_set_key(const char *ifname, void *priv,
         */
        if (ret || !set_tx || alg == WPA_ALG_NONE)
                return ret;
-#ifdef HOSTAPD /* FIX: is this needed? */
+#ifdef HOSTAPD
        if (addr)
                return ret;
+#else /* HOSTAPD */
+       if (drv->nlmode == NL80211_IFTYPE_AP && addr)
+               return ret;
 #endif /* HOSTAPD */
 
        msg = nlmsg_alloc();