Re: wlan0 no longer functional after n249128-a0c64a443e4c -> n249146-cb5c07649aa0

From: Cy Schubert <>
Date: Mon, 06 Sep 2021 18:21:55 UTC
In message <>, "Oleg V. Nauman" 
> On 2021 M09 6, Mon 20:31:33 EEST Cy Schubert wrote:
> > One last favour to ask, can you try this with the wpa_supplicant-devel
> > port, please? I'm trying to narrow down if this is related to the options
> > in usr.sbin/wpa/ or an upstream problem. If this behaves the
> > same using wpa_supplicant-devel, this tells me to look at the code instead
> > of Makefiles.
> > 
> > I can reproduce the service netif restart problem using the old
> > wpa_supplicant 2.9, so at least here there is no change in behaviour.
> > Though on my sandbox machine the ifconfig dow/up is not required -- though
> > even the older wpa_supplicant 2.9 behaves the same on my laptop, (no
> > regression experienced here).
> > 
> > To help point to either or contrib/wpa, can you please try the
> > wpa_supplicant-devel port. This will tell me where to look next.
>  I can confirm that wpa_supplicant from security/wpa_supplicant-devel port 
> demonstrating the same behavior as wpa_supplicant from base - "ifconfig wlan0
> down ; sleep 5 ; ifconfig wlan0 up" mitigate wlan association issue.

Thank you.

This is an issue that I'll need to chase down with our upstream. In the 
mean time while work on this/bring it to upstream's attention this should 
circumvent the issue:

diff --git a/libexec/rc/rc.d/wpa_supplicant b/libexec/rc/rc.d/wpa_supplicant
index 8a86fec90e4d..cfe5f1ab27c6 100755
--- a/libexec/rc/rc.d/wpa_supplicant
+++ b/libexec/rc/rc.d/wpa_supplicant
@@ -12,6 +12,7 @@
 desc="WPA/802.11i Supplicant for wireless network devices"
@@ -27,6 +28,12 @@ is_ndis_interface()
+wpa_poststart() {
+	ifconfig ${ifn} down
+	sleep 3
+	ifconfig ${ifn} up
 if is_wired_interface ${ifn} ; then
 elif is_ndis_interface ${ifn} ; then

I'll have more questions later (need to start working on another job) but 
I'd like to learn more about your configuration to understand why it works 
at boot for myself and phlip@ and not for you and the others here on 
-current who have experienced the same issue. Understanding what triggers 
this will go a long way to resolving it.

(cc'd philip@)

BTW, my laptop is configured so that wlan0 (iwn0) and bge0 are members of 
lagg0. Whereas on my sandbox wlan0 (ath0) is used directly.

Cy Schubert <>
FreeBSD UNIX:  <>   Web:
NTP:           <>    Web:

	The need of the many outweighs the greed of the few.