diff options
author | John Crispin <blogic@openwrt.org> | 2014-06-02 12:44:40 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-06-02 12:44:40 +0000 |
commit | c759214048ad3e9040367d9dad487c9826d94f6e (patch) | |
tree | cad4021073108a7763166eddc8dedd97217551a1 /package/network | |
parent | b9907f1565b10bf492bde2892deed815db6b9a0f (diff) | |
download | upstream-c759214048ad3e9040367d9dad487c9826d94f6e.tar.gz upstream-c759214048ad3e9040367d9dad487c9826d94f6e.tar.bz2 upstream-c759214048ad3e9040367d9dad487c9826d94f6e.zip |
hostapd: Add optional support for hostapd own_ip_addr in wireless config
`own_ip_addr` is used by hostapd as NAS-IP-Address.
This is used to identify the AP that is requesting the authentication of the
user and could be used to define which AP's can authenticate users.
Some vendors implement only NAS-Identifier or NAS-IP-Address and not both.
This patch adds ownip as an optional parameter in /etc/config/wireless.
Signed-off-by: Thomas Wouters <thomaswouters@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40934 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network')
-rw-r--r-- | package/network/services/hostapd/files/hostapd.sh | 2 | ||||
-rw-r--r-- | package/network/services/hostapd/files/netifd.sh | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index b55b63db7c..2a16bb4602 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -130,7 +130,9 @@ hostapd_set_bss_options() { append "$var" "radius_das_client=$dae_client $dae_secret" "$N" } config_get nasid "$vif" nasid + config_get ownip "$vif" ownip append "$var" "nas_identifier=$nasid" "$N" + append "$var" "own_ip_addr=$ownip" "$N" append "$var" "eapol_key_index_workaround=1" "$N" append "$var" "ieee8021x=1" "$N" append "$var" "wpa_key_mgmt=WPA-EAP" "$N" diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh index ab31361ebb..1cc5713cbf 100644 --- a/package/network/services/hostapd/files/netifd.sh +++ b/package/network/services/hostapd/files/netifd.sh @@ -119,6 +119,7 @@ hostapd_common_add_bss_config() { config_add_int dae_port config_add_string nasid + config_add_string ownip config_add_string iapp_interface config_add_string eap_type ca_cert client_cert identity auth priv_key priv_key_pwd @@ -208,7 +209,7 @@ hostapd_set_bss_options() { acct_server acct_secret acct_port \ dae_client dae_secret dae_port \ nasid rsn_preauth iapp_interface \ - eap_reauth_period + ownip eap_reauth_period # legacy compatibility [ -n "$auth_server" ] || json_get_var auth_server server @@ -238,6 +239,7 @@ hostapd_set_bss_options() { } append bss_conf "nas_identifier=$nasid" "$N" + [ -n "$ownip" ] && append bss_conf "own_ip_addr=$ownip" "$N" append bss_conf "eapol_key_index_workaround=1" "$N" append bss_conf "ieee8021x=1" "$N" append bss_conf "wpa_key_mgmt=WPA-EAP" "$N" |