hostapd: mirror ieee80211w ap mode defaults in station mode
authorJo-Philipp Wich <jo@mein.io>
Fri, 20 Sep 2019 11:20:21 +0000 (13:20 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 20 Sep 2019 11:27:28 +0000 (13:27 +0200)
For AP mode, OpenWrt automatically sets ieee80211w to either 1 or 2, depending
on whether the encryption is set to sae-mixed, or sae/owe/eap suite-b.

Mirror the same defaults for client mode connections, in order to allow an
OpenWrt station to associate to an OpenWrt ap with SAE, OWE or Suite-B encryption
without the need to manually specify "option ieee80211w" on the station.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
package/network/services/hostapd/Makefile
package/network/services/hostapd/files/hostapd.sh

index e94d66211d9f59488b6dca205a7adf9ed3310ef8..63e7a5dea14667cc672a1e5238cec9f3692dea12 100644 (file)
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=10
+PKG_RELEASE:=11
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
index c7f3ea2c1e2dda10a5bceeaa95310630d866a76f..8da8539e8a50bf7ad8887dbee42b7012e39e1525 100644 (file)
@@ -747,6 +747,15 @@ wpa_supplicant_add_network() {
                ieee80211w ieee80211r \
                multi_ap
 
+       case "$auth_type" in
+               sae|owe|eap192|eap-eap192)
+                       set_default ieee80211w 2
+               ;;
+               psk-sae)
+                       set_default ieee80211w 1
+               ;;
+       esac
+
        set_default ieee80211r 0
        set_default multi_ap 0