When enabling MFP, hostapd will read assoc_sa_query_max_timeout and
[openwrt.git] / package / hostapd / files / hostapd.sh
index c83c06df8654da399b2a117f4946ff38c337e7dd..9ef8282bd34f0a38900b0d421452dd466e77431d 100644 (file)
@@ -106,6 +106,21 @@ hostapd_set_bss_options() {
        append "$var" "ssid=$ssid" "$N"
        [ -n "$bridge" ] && append "$var" "bridge=$bridge" "$N"
        [ -n "$ieee80211d" ] && append "$var" "ieee80211d=$ieee80211d" "$N"
+
+       [ "$wpa" -ge "2" ] && config_get ieee80211w "$vif" ieee80211w
+       case "$ieee80211w" in
+               [012])
+                       append "$var" "ieee80211w=$ieee80211w" "$N"
+                       [ "$ieee80211w" -gt "0" ] && {
+                               config_get ieee80211w_max_timeout "$vif" ieee80211w_max_timeout
+                               config_get ieee80211w_retry_timeout "$vif" ieee80211w_retry_timeout
+                               [ -n "$ieee80211w_max_timeout" ] && \
+                                       append "$var" "assoc_sa_query_max_timeout=$ieee80211w_max_timeout" "$N"
+                               [ -n "$ieee80211w_retry_timeout" ] && \
+                                       append "$var" "assoc_sa_query_retry_timeout=$ieee80211w_retry_timeout" "$N"
+                       }
+               ;;
+       esac
 }
 
 hostapd_setup_vif() {