Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Nov 2013 20:40:03 +0200
From:      clutton <clutton@zoho.com>
To:        freebsd-wireless@freebsd.org
Subject:   Re: service netif restart [iface] runs a wpa_supplicant twice
Message-ID:  <1383331203.12614.1.camel@eva02.mbsd>
In-Reply-To: <CAJ-Vmok=-bWq-eohdJt%2BwcTrJ43cak_sQu_hxO%2Bzt7HauGgg5g@mail.gmail.com>
References:  <1382572583.1862.39.camel@eva02.mbsd> <CAJ-VmonD%2B0rEAYm0Zk5HviciJEngTQ2j5xcKPzuNXBH8CWNA7g@mail.gmail.com> <1382589020.1846.36.camel@eva02.mbsd> <CAJ-Vmok=-bWq-eohdJt%2BwcTrJ43cak_sQu_hxO%2Bzt7HauGgg5g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-nutuopRJ+OnH5uQKKcpE
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Wed, 2013-10-23 at 21:43 -0700, Adrian Chadd wrote:
> IT's not. It's devd doing something dumb.
>=20
>=20
> -a
>=20
>=20
> On 23 October 2013 21:30, clutton <clutton@zoho.com> wrote:
>=20
> > Indeed.
> >
> > I have looked at a sys/net80211 and at a sys/dev/ath.
> > But I still have no idea which one triggers rc script and how on the
> > earth it can be done.
> >
> > On Wed, 2013-10-23 at 16:57 -0700, Adrian Chadd wrote:
> > > . that needs to be fixed. It definitely shouldn't be started twice!
> > >
> > >
> > >
> > > -adrian
> > >
> > >
> > >
> > > On 23 October 2013 16:56, clutton <clutton@zoho.com> wrote:
> > >
> > > > What is the best way to restart a wireless stack?
> > > >
> > > > A command "ifconfig wlan0 create wlandev ath0" starts the
> > wpa_supplicant
> > > > by itself. It means that the netif script runs the wpa_supplicant
> > twice,
> > > > always. Is it ok?
> > > >
> > > > There is my debug during booting:
> > > >
> > > > [netif.network_common()] START:
> > > > [netif.network_common()] ITERATION:
> > > > [wpa_supplicant] SUPPID=3D30067
> > > > [wpa_supplicant] SUPPID=3D30067
> > > > [netif.network_common()] STOP:
> > > >
> > > > It means that during running a network_common() from the
> > /etc/rc.d/netif
> > > > the /etc/rc.d/wpa_supplicant was called twice.
> > > >
> > > > /etc/rc.conf
> > > > wlans_ath0=3D"wlan0"
> > > > ifconfig_wlan0=3D"WPA DHCP"
> > > > ifconfig_em0=3D"DHCP"
> > > > ipsec_enable=3D"YES"
> > > >
> > > > /etc/wpa_supplicant.conf
> > > > network=3D{
> > > >   ssid=3D"ssid"
> > > >   psk=3D"psk"
> > > > }
> > > >
> > > > 11.0-CURRENT
> > > >
> > > _______________________________________________
> > > freebsd-wireless@freebsd.org mailing list
> > > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> > > To unsubscribe, send any mail to "
> > freebsd-wireless-unsubscribe@freebsd.org"
> >
> >
> _______________________________________________
> freebsd-wireless@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.or=
g"

Yes, it's not a bug, just misconfigured devd.
Here the patch:

=CE=9E ~ =E2=86=92 diff -u /usr/src/etc/devd.conf /etc/devd.conf =20
--- /usr/src/etc/devd.conf	2013-09-29 17:24:16.759250174 +0300
+++ /etc/devd.conf	2013-11-01 10:52:02.731746832 +0200
@@ -38,7 +38,7 @@
 #
 notify 0 {
 	match "system"		"IFNET";
-	match "subsystem"	"!usbus[0-9]+";
+	match "subsystem"	"!(usbus|wlan)[0-9]+";
 	match "type"		"ATTACH";
 	action "/etc/pccard_ether $subsystem start";
 };
zsh: exit 1     diff -u /usr/src/etc/devd.conf /etc/devd.conf
=E2=86=911 ~ =E2=86=92=20

Is it good enough? Should I make an pr?
I believe that the wlan iface may be avoided and all cases, am I wrong?

--=-nutuopRJ+OnH5uQKKcpE
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iQIcBAABAgAGBQJSc/WDAAoJECNkWbjnbjuipeoP/RnoiUb+uhIpCw1Qht42MhFS
MgYJyIkFMzncEithc2AOpARC1JDnJQ6JOztgTGeDcZC0nkPPc45zjwtZGk5cQpk1
sq1d70SyOhSFN1b/MPeXLM04/D0fiPHmpIasddTkpS2XsGAc0jVUrFXsB7Ewgc8f
EYDz6f5oABNmautLOAoavdzAj47wgZY0gSGgS1JSnRUekqftTKUCvfIqEgPGhqCG
YUW8SfLm1kG+nh7db5VaqbJI+NewtO5M8UdBwuDVXV8D97hrA23JyC+qIU9H/M+1
7eQP5nldKyYH4J4UXdBg+/Rhb1zeaiBSSo3J90I0s526LKSRjI87m4pm8wWfN9aD
bOHsujcphJDPQvMCB5yOVEYk3KEJz3EVsvVfW5P85iodCKGg08KxFG6Y1fx+Pnnd
AEj/NNVP8OPRXtNX2VAaDw2jRQ/JRsvnO8HUbx2XxOpXnR6WvJD5zVzRZgSd+jRI
GxEGaesjoSh5rRheUqpep9alRDKa1TNhf/8xkETAIXz1zdy13u5YQzdA76tWKMJE
ojkRzuS6UUu/GmSZspStax9mdYhCmJZt3+rL4Qafi8CybJXa3wPC233ucY0zfL3o
P/AFQ0zSmyZMloGZsTHG6xtW134CAeIBAM6CZ356DQmkzsLCnNIznr3PSvDXr7C5
+hGijWCBZQr8tJcMQCtJ
=hAmq
-----END PGP SIGNATURE-----

--=-nutuopRJ+OnH5uQKKcpE--





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1383331203.12614.1.camel>