aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-03-26 23:34:33 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-03-26 23:34:33 +0000
commit36085d779a277f827029100fe1716825f45cf0ca (patch)
tree10e554e46141dc76cbe6cfb7e674f747a426ad61 /package/network/services
parent8683f4c75523d94df8aa2a456f33df3389b61602 (diff)
downloadmaster-187ad058-36085d779a277f827029100fe1716825f45cf0ca.tar.gz
master-187ad058-36085d779a277f827029100fe1716825f45cf0ca.tar.bz2
master-187ad058-36085d779a277f827029100fe1716825f45cf0ca.zip
hostapd: add 802.11r support
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45051 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services')
-rw-r--r--package/network/services/hostapd/files/hostapd.sh29
-rw-r--r--package/network/services/hostapd/files/netifd.sh37
2 files changed, 65 insertions, 1 deletions
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index a4b38d7c4f..7aec7ad8a4 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -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
diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index a5abdce1ce..6e4b23b73e 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -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