On 14-06-17 14:51, 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 broken. Please use git send-email or create a PR on Github.
> Signed-off-by: Yury Shvedov <yshve...@wimarksystems.com>
> ---
>  package/network/services/hostapd/files/hostapd.sh | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/package/network/services/hostapd/files/hostapd.sh 
> b/package/network/services/hostapd/files/hostapd.sh
> index 9514f919ee..8920c51eb7 100644
> --- a/package/network/services/hostapd/files/hostapd.sh
> +++ b/package/network/services/hostapd/files/hostapd.sh
> @@ -370,11 +370,9 @@ hostapd_set_bss_options() {
>               network_get_device ifname "$iapp_interface" || ifname = 
> "$iapp_interface"
>               append bss_conf "iapp_interface=$ifname" "$N"
>       }
> -
>       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 \
> @@ -433,6 +431,11 @@ hostapd_set_bss_options() {
>               esac
>       fi
>  +    if [ -n "$acct_server" -o "$wpa" -ge "1" ]; then
> +             json_get_vars nasid
> +             [ -n "$nasid" ] && append bss_conf "nas_identifier=$nasid" "$N"
> +     fi
> +
Since we are moving this directive, I would put it right before the code
that adds acct_server_addr to the config. I would even consider dropping
the if around it entirely, adding the directive doesn't break anything
with wpa and accounting disabled. In this case you can use the
json_get_vars at the beginning of hostapd_set_bss_options.
>       _macfile="/var/run/hostapd-$ifname.maclist"
>       case "$macfilter" in
>               allow)

Thanks,
Stijn

_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to