From 0da2c91e64528d896f69d36670e25b4b4a140579 Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Mon, 13 Dec 2021 15:47:51 -0800 Subject: [PATCH] hostapd: Fix wlan interfaces not UP/RUNNING Like wpa_supplicant, hostapd does not automatically UP the interface when configured. The fix is similar to 5fcdc19a8111. Reported by: avg Tested by: avg MFC after: 1 week --- libexec/rc/rc.d/hostapd | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libexec/rc/rc.d/hostapd b/libexec/rc/rc.d/hostapd index 707316036604..7e1611350438 100755 --- a/libexec/rc/rc.d/hostapd +++ b/libexec/rc/rc.d/hostapd @@ -12,6 +12,13 @@ name="hostapd" desc="Authenticator for IEEE 802.11 networks" command=${hostapd_program} +start_postcmd="hostapd_poststart" + +hostapd_poststart() { + ifconfig ${ifn} down + sleep 2 + ifconfig ${ifn} up +} ifn="$2" if [ -z "$ifn" ]; then