Date: Thu, 29 Aug 2024 11:50:42 +0000 From: bugzilla-noreply@freebsd.org To: wireless@FreeBSD.org Subject: [Bug 278306] service netif start doesn't bring up the wireless interface if /etc/wpa_supplicant.conf is missing Message-ID: <bug-278306-21060-o1OPAt9Sr9@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-278306-21060@https.bugs.freebsd.org/bugzilla/> References: <bug-278306-21060@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278306 Bjoern A. Zeeb <bz@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Open |In Progress --- Comment #10 from Bjoern A. Zeeb <bz@FreeBSD.org> --- (In reply to Oleksandr Kryvulia from comment #9) Thanks for the feedback. That in theory seems the right solution to me. If we wanted to "automate" this and let meta-flags like DHCP and WPA count = as well, then we probably want to make sure the IF is up before wpa or hostapd start? I am not good at this and I probably do not understand all the possible side-effects but maybe someone from rc@ or net@ can review this? I wonder = if this would do the right thing... diff --git libexec/rc/network.subr libexec/rc/network.subr index 257643f48ba5..7e8502273353 100644 --- libexec/rc/network.subr +++ libexec/rc/network.subr @@ -216,14 +216,15 @@ ifconfig_up() ${IFCONFIG_CMD} $1 description "${_ifconfig_descr}" fi + if [ ${_cfg} -eq 0 ]; then + ${IFCONFIG_CMD} $1 up + fi if wpaif $1; then /etc/rc.d/wpa_supplicant start $1 _cfg=3D0 # XXX: not sure this should count elif hostapif $1; then /etc/rc.d/hostapd start $1 _cfg=3D0 - elif [ ${_cfg} -eq 0 ]; then - ${IFCONFIG_CMD} $1 up fi if ! noafif $1 && afexists inet6; then --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-278306-21060-o1OPAt9Sr9>