hostapd: Allow rsn_preauth configuration

Hostapd can allow preauthentication for WPA2-EAP networks when
the interfaces through which preauthentication is allowed are
configured.

Add a new param "rsn_preauth=0/1" to the configuration that enables
or disables preauthentication on the according bridge interface.

Preauthentication for unbridged networks is not considered in this
patch.

Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

SVN-Revision: 24721
owl
Felix Fietkau 2010-12-19 11:48:31 +00:00
parent ba45b5a907
commit d08bc913a8
1 changed files with 26 additions and 14 deletions

View File

@ -139,7 +139,18 @@ hostapd_set_bss_options() {
[ -n "$ieee80211d" ] && append "$var" "ieee80211d=$ieee80211d" "$N" [ -n "$ieee80211d" ] && append "$var" "ieee80211d=$ieee80211d" "$N"
[ -n "$iapp_interface" ] && append "$var" $(uci_get_state network "$iapp_interface" ifname "$iapp_interface") "$N" [ -n "$iapp_interface" ] && append "$var" $(uci_get_state network "$iapp_interface" ifname "$iapp_interface") "$N"
[ "$wpa" -ge "2" ] && config_get ieee80211w "$vif" ieee80211w if [ "$wpa" -ge "2" ]
then
# RSN -> allow preauthentication
config_get rsn_preauth "$vif" rsn_preauth
if [ -n "$bridge" -a "$rsn_preauth" = 1 ]
then
append "$var" "rsn_preauth=1" "$N"
append "$var" "rsn_preauth_interfaces=$bridge" "$N"
fi
# RSN -> allow management frame protection
config_get ieee80211w "$vif" ieee80211w
case "$ieee80211w" in case "$ieee80211w" in
[012]) [012])
append "$var" "ieee80211w=$ieee80211w" "$N" append "$var" "ieee80211w=$ieee80211w" "$N"
@ -153,6 +164,7 @@ hostapd_set_bss_options() {
} }
;; ;;
esac esac
fi
} }
hostapd_setup_vif() { hostapd_setup_vif() {