[package] firewall: fix wrong rule order if multiple protocols are used
[openwrt.git] / package / hostapd / files / hostapd.sh
index 39f98f2..d80729f 100644 (file)
@@ -9,6 +9,9 @@ hostapd_set_bss_options() {
 
        config_get device "$vif" device
        config_get hwmode "$device" hwmode
+       config_get phy "$device" phy
+
+       append "$var" "ctrl_interface=/var/run/hostapd-$phy" "$N"
 
        if [ "$ap_isolate" -gt 0 ]; then
                append "$var" "ap_isolate=$ap_isolate" "$N"
@@ -137,7 +140,7 @@ hostapd_set_bss_options() {
        append "$var" "ssid=$ssid" "$N"
        [ -n "$bridge" ] && append "$var" "bridge=$bridge" "$N"
        [ -n "$ieee80211d" ] && append "$var" "ieee80211d=$ieee80211d" "$N"
-       [ -n "$iapp_interface" ] && append "$var" $(uci_get_state network "$iapp_interface" ifname "$iapp_interface") "$N"
+       [ -n "$iapp_interface" ] && append "$var" iapp_interface=$(uci_get_state network "$iapp_interface" ifname "$iapp_interface") "$N"
 
        if [ "$wpa" -ge "2" ]
        then
@@ -184,7 +187,6 @@ hostapd_setup_vif() {
        [ "$channel" = auto ] && channel=
        [ -n "$channel" -a -z "$hwmode" ] && wifi_fixup_hwmode "$device"
        cat > /var/run/hostapd-$ifname.conf <<EOF
-ctrl_interface=/var/run/hostapd-$ifname
 driver=$driver
 interface=$ifname
 ${hwmode:+hw_mode=${hwmode#11}}
This page took 0.024113 seconds and 4 git commands to generate.