diff mbox

[LEDE-DEV] hostapd: configure NAS ID regardless of encryption

Message ID 20170627082152.32684-1-yshvedov@wimarksystems.com
State Superseded
Headers show

Commit Message

Yury Shvedov June 27, 2017, 8:21 a.m. UTC
RADIUS protocol could be used not only for authentication but for
accounting too. Accounting could be configured for any type of networks.
However there no way to configure NAS Identifier for non-WPA-EAP
networks without this patch.

Signed-off-by: Yury Shvedov <yshvedov@wimarksystems.com>
---
 package/network/services/hostapd/files/hostapd.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Stijn Tintel June 27, 2017, 8:28 a.m. UTC | #1
On 27-06-17 10:21, Yury Shvedov wrote:
> RADIUS protocol could be used not only for authentication but for
> accounting too. Accounting could be configured for any type of networks.
> However there no way to configure NAS Identifier for non-WPA-EAP
> networks without this patch.
The patch is not mangled now, but no longer applies cleanly due to the
changes in your previous patch. Please rebase it on master and resend.

Thanks,
Stijn
diff mbox

Patch

diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index 2c015f9c4b..4239676169 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -212,7 +212,7 @@  hostapd_set_bss_options() {
 		wps_independent wps_device_type wps_device_name wps_manufacturer wps_pin \
 		macfilter ssid wmm uapsd hidden short_preamble rsn_preauth \
 		iapp_interface eapol_version acct_server acct_secret acct_port \
-		dynamic_vlan ieee80211w
+		dynamic_vlan ieee80211w nasid
 
 	set_default isolate 0
 	set_default maxassoc 0
@@ -248,6 +248,7 @@  hostapd_set_bss_options() {
 		[ -n "$wpa_master_rekey" ] && append bss_conf "wpa_gmk_rekey=$wpa_master_rekey"  "$N"
 	}
 
+	[ -n "$nasid" ] && append bss_conf "nas_identifier=$nasid" "$N"
 	[ -n "$acct_server" ] && {
 		append bss_conf "acct_server_addr=$acct_server" "$N"
 		append bss_conf "acct_server_port=$acct_port" "$N"
@@ -373,9 +374,8 @@  hostapd_set_bss_options() {
 	}
 
 	if [ "$wpa" -ge "1" ]; then
-		json_get_vars nasid ieee80211r
+		json_get_vars ieee80211r
 		set_default ieee80211r 0
-		[ -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 \