hostapd: do not restart hostapd instance on wireless restarts
authorFelix Fietkau <nbd@nbd.name>
Mon, 28 Dec 2020 14:01:00 +0000 (15:01 +0100)
committerFelix Fietkau <nbd@nbd.name>
Thu, 31 Dec 2020 13:26:00 +0000 (14:26 +0100)
Add the flag that prevents netifd from killing hostapd/wpa_supplicant

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
package/network/services/hostapd/files/hostapd.sh

index e12a804271e5e6f41e1c5c5b123cadbb2ce701c4..95b6c817ffc1e397a0992c4268b5a485f4638135 100644 (file)
@@ -1021,7 +1021,7 @@ drv_mac80211_setup() {
                        ubus wait_for hostapd
                        ubus call hostapd config_add "{\"iface\":\"$primary_ap\", \"config\":\"${hostapd_conf_file}\"}"
                        local hostapd_pid=$(ubus call service list '{"name": "wpad"}' | jsonfilter -l 1 -e "@['wpad'].instances['hostapd'].pid")
-                       wireless_add_process "$hostapd_pid" "/usr/sbin/hostapd" 1
+                       wireless_add_process "$hostapd_pid" "/usr/sbin/hostapd" 1 1
                fi
                ret="$?"
                [ "$ret" != 0 ] && {
index 78f6a19612e936c13eed589392974eeb9815618a..fc78e2fb90e119e749d1ca15e76628073a4213e0 100644 (file)
@@ -1379,7 +1379,7 @@ wpa_supplicant_run() {
        [ "$ret" != 0 ] && wireless_setup_vif_failed WPA_SUPPLICANT_FAILED
 
        local supplicant_pid=$(ubus call service list '{"name": "wpad"}' | jsonfilter -l 1 -e "@['wpad'].instances['supplicant'].pid")
-       wireless_add_process "$supplicant_pid" "/usr/sbin/wpa_supplicant" 1
+       wireless_add_process "$supplicant_pid" "/usr/sbin/wpa_supplicant" 1 1
 
        return $ret
 }