Date: Sat, 02 Nov 2013 21:13:16 +0200 From: clutton <clutton@zoho.com> To: freebsd-wireless@freebsd.org Subject: Re: service netif restart [iface] runs a wpa_supplicant twice Message-ID: <1383419596.3253.42.camel@eva02.mbsd> In-Reply-To: <CAJ-Vmok3vfXfLTcMk%2BRh9_nAL3fP02phw%2BaNjQjbfhQDaLtCew@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> <1383331203.12614.1.camel@eva02.mbsd> <CAAgh0_aq7Mw-4JA6sEa2MoaqjivSNTKkRnfJwuct%2B=v-o4U2kg@mail.gmail.com> <CAJ-VmonRPHaYAKTm8V5Rj2Uc_ONqbTu2wxZrTM%2Buwpkc7RpLTg@mail.gmail.com> <1383336004.13657.18.camel@eva02.mbsd> <CAJ-VmomTsNH=%2BE_HXrSBfq-FLfw_5FqejW2NkH%2BLTKVFMSda4A@mail.gmail.com> <1383338117.13657.53.camel@eva02.mbsd> <CAJ-VmonP63PV%2BoP6feZiRCJrB_fFU3xwK%2Btu%2BB6MR-py4ey_4Q@mail.gmail.com> <1383382815.31973.1.camel@eva02.mbsd> <CAAgh0_biBXGBYSuJN_j0XAk-5aL%2BFi_EyZQCoZ4N7R%2B17BvMDg@mail.gmail.com> <CAJ-Vmok3vfXfLTcMk%2BRh9_nAL3fP02phw%2BaNjQjbfhQDaLtCew@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-n+s/DsaiIaKH72GPhAGc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 2013-11-02 at 10:00 -0700, Adrian Chadd wrote: > right, this makes it clearer. >=20 > What about: >=20 > * the wpa_supplicant rc script only starts/stops one wpa_supplicant insta= nce > * upon ethernet / wlan clone creation, use interface_add to add the > interface to wpa_supplicant > * upon ethernet / wlan clone destruction, use interface_remove >=20 > how's that sound? >=20 >=20 > -adrian Sounds nice, but firstly we need to figure out this case, and then we can do adding/removing/whatever Without fixing that, it would be possible to see adding/removing/whatever twice. How to reproduce: 1) put debug info into rc.d/wpa_supplicant, a =C2=ABtoto=C2=BB looks very informative! =E2=86=911 ~ =E2=86=92 diff -u /usr/src/etc/rc.d/wpa_supplicant /etc/rc.d/w= pa_supplicant --- /usr/src/etc/rc.d/wpa_supplicant 2013-06-19 01:06:53.911196741 +0300 +++ /etc/rc.d/wpa_supplicant 2013-11-02 20:42:02.556222618 +0200 @@ -34,6 +34,8 @@ driver=3D"bsd" fi =20 +echo toto >> /tmp/toto + load_rc_config $name =20 command=3D${wpa_supplicant_program} zsh: exit 1 diff -u /usr/src/etc/rc.d/wpa_supplicant /etc/rc.d/wpa_supplicant =E2=86=911 ~ =E2=86=92=20 2) then: service netif restart 3) then: cat /tmp/toto, how many totos do you see? 4) if you are lucky like I am, you can even observe something like this: root 15038 0.0 0.1 21596 6100 - Ss 8:42pm 0:00.16 /usr/sbin/wpa_supplicant -s -B -i wlan0 -c /etc/wpa_supplicant.conf -D bsd -P /var/run/wpa_supplicant/wlan0.pid root 15077 0.0 0.1 21596 6112 - Ss 8:42pm 0:00.12 /usr/sbin/wpa_supplicant -s -B -i wlan0 -c /etc/wpa_supplicant.conf -D bsd -P /var/run/wpa_supplicant/wlan0.pid What was happened? netif tries to setup wlan0 (clone, wpa, dhcp, etc), when wlan0 interface occurs, devd runs another copy of netif. --=-n+s/DsaiIaKH72GPhAGc 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) iQIcBAABAgAGBQJSdU7MAAoJECNkWbjnbjui98sQAIYwzxdGjOMUFcSctjUcYrT0 2oMtA7/q2s6gCKlmNvamd76v5onat2Exw8RKkRbaFWNltJgEx/N5N3im8LGyGzg8 Xdps6Tm5+nUBKcRPe70p/e4UQCcl1smWXbT2wrtVtTE4PJ2IE6SiVKiqcucyzYD+ 8xnyVgDiWDsytQob89E4Fpj6/0YtzEca8Z7SwycOAFjvO6cQ+rOKEqkHdyK7hN1r o4fsVWGqP1jP59Qm3eofyZWpGqj2ZOZnJXSvfsCPHH7EqPexULWc9TclueFmveWJ Hdw93ro5YR4E6GcUfMZuOpGPHszom3alHpi7dnNpBqr2ZCFC+DNPawQoYJRpQIP9 rX7hophzacx4vS+VcxwHupS1YSC5uYAlnqTTtUZfyBi0CwcjY1ce9rnyXF8Nx4c9 +i8tCeqLHHE0Ql9A1UqTWESNyX8UHYK7Gm4PzSh38c0O6nmJ5Dn/Gr5Nui0hiWgz b0Y+WaJcUmm9rOCapkbBWO6wsVZ0zy7alQkgkk+T2y8pQIjpdRfL4YQeGfBmlPFW mXHtl2Q3YcFkEbNht8TDwxxe83Cg7U+w0ZFBhmEVgpnNBtkoLFzI7C3JeRYm3xaM p3T2qlCixKZogXSTLmLDZTzaCAAoFu3jnCEnT1/xo2KWFNZ5yMctMlVX8AJXXYWz uGw7RwhUvhghIkKITPJR =9ubh -----END PGP SIGNATURE----- --=-n+s/DsaiIaKH72GPhAGc--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1383419596.3253.42.camel>