hostapd: add 802.11r support

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

SVN-Revision: 45051
This commit is contained in:
Felix Fietkau 2015-03-26 23:34:33 +00:00
parent 07b17c6b25
commit 23b4bf6507
2 changed files with 65 additions and 1 deletions

View file

@ -219,6 +219,35 @@ hostapd_set_bss_options() {
then
config_get nasid "$vif" nasid
[ -n "$nasid" ] && append "$var" "nas_identifier=$nasid" "$N"
config_get_bool ieee80211r "$vif" ieee80211r 0
if [ "$ieee80211r" -gt 0 ]
then
config_get mobility_domain "$vif" mobility_domain "4f57"
config_get r0_key_lifetime "$vif" r0_key_lifetime "10000"
config_get r1_key_holder "$vif" r1_key_holder "00004f577274"
config_get reassociation_deadline "$vif" reassociation_deadline "1000"
config_get r0kh "$vif" r0kh
config_get r1kh "$vif" r1kh
config_get_bool pmk_r1_push "$vif" pmk_r1_push 0
append "$var" "mobility_domain=$mobility_domain" "$N"
append "$var" "r0_key_lifetime=$r0_key_lifetime" "$N"
append "$var" "r1_key_holder=$r1_key_holder" "$N"
append "$var" "reassociation_deadline=$reassociation_deadline" "$N"
append "$var" "pmk_r1_push=$pmk_r1_push" "$N"
for kh in $r0kh; do
"$var" "r0kh=${kh//,/ }" "$N"
done
for kh in $r1kh; do
"$var" "r1kh=${kh//,/ }" "$N"
done
[ "$wpa_key_mgmt" != "${wpa_key_mgmt/EAP/}" ] && append wpa_key_mgmt "FT-EAP"
[ "$wpa_key_mgmt" != "${wpa_key_mgmt/PSK/}" ] && append wpa_key_mgmt "FT-PSK"
fi
[ -n "wpa_key_mgmt" ] && append "$var" "wpa_key_mgmt=$wpa_key_mgmt"
fi

View file

@ -148,6 +148,11 @@ hostapd_common_add_bss_config() {
config_add_boolean wps_pushbutton wps_label ext_registrar wps_pbc_in_m1
config_add_string wps_device_type wps_device_name wps_manufacturer wps_pin
config_add_boolean ieee80211r pmk_r1_push
config_add_int r0_key_lifetime reassociation_deadline
config_add_string mobility_domain r1_key_holder
config_add_array r0kh r1kh
config_add_int ieee80211w_max_timeout ieee80211w_retry_timeout
config_add_string macfilter 'macfile:file'
@ -340,8 +345,38 @@ hostapd_set_bss_options() {
}
if [ "$wpa" -ge "1" ]; then
json_get_vars nasid
json_get_vars nasid ieee80211r
[ -n "$nasid" ] && append bss_conf "nas_identifier=$nasid" "$N"
if [ "$ieee80211r" -gt "0" ]; then
json_get_vars mobility_domain r0_key_lifetime r1_key_holder \
reassociation_deadline pmk_r1_push
json_get_values r0kh r0kh
json_get_values r1kh r1kh
set_default mobility_domain "4f57"
set_default r0_key_lifetime 10000
set_default r1_key_holder "00004f577274"
set_default reassociation_deadline 1000
set_default pmk_r1_push 0
append bss_conf "mobility_domain=$mobility_domain" "$N"
append bss_conf "r0_key_lifetime=$r0_key_lifetime" "$N"
append bss_conf "r1_key_holder=$r1_key_holder" "$N"
append bss_conf "reassociation_deadline=$reassociation_deadline" "$N"
append bss_conf "pmk_r1_push=$pmk_r1_push" "$N"
for kh in $r0kh; do
append bss_conf "r0kh=${kh//,/ }" "$N"
done
for kh in $r1kh; do
append bss_conf "r1kh=${kh//,/ }" "$N"
done
[ "$wpa_key_mgmt" != "${wpa_key_mgmt/EAP/}" ] && append wpa_key_mgmt "FT-EAP"
[ "$wpa_key_mgmt" != "${wpa_key_mgmt/PSK/}" ] && append wpa_key_mgmt "FT-PSK"
fi
[ -n "$wpa_key_mgmt" ] && append bss_conf "wpa_key_mgmt=$wpa_key_mgmt" "$N"
fi