Re: Network Manager Fails to control Wi-Fi



Thanks Dan. That's exactly what I wanted to know.

On Fri, Sep 25, 2015 at 8:19 PM, Dan Williams <dcbw redhat com> wrote:
On Fri, 2015-09-25 at 11:28 +0530, Ramprasad Vempati wrote:
Thanks Dan. But can you tell me how will Network-Manager find out PID
of wpa_supplicant? Is it via:/run/sendsigs.omit.d/wpasupplicant.pid ,
which is from below file? If yes, as long as I remove
"/sbin/wpa_supplicant" also, Network-Manager shouldn't be able to
control Wi-Fi, right?

NetworkManager doesn't care about the PID of the supplicant, because
it's using the D-Bus interface to talk to it.  When the supplicant
starts its D-Bus service enabled, it talks to dbus-daemon and says "hey,
I'm fi.w1.wpa_supplicant and I'm ready!".  dbus-daemon broadcasts that
to all other D-Bus clients like NetworkManager.  If the supplicant is
started already when NM starts, then NM asks dbus-daemon "hey, is
fi.w1.wpa_supplicant around?".  So there's no pid files involved.

Instead, to make sure the supplicant and NM cannot talk, make sure you
turn off the D-Bus interface, which you can do by either:

1) removing the "-u" option
from /usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service

2) running a different supplicant that isn't built with the D-Bus
interface in the code, or is run without the "-u" option

Dan

cat /usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service
[D-BUS Service]
Name=fi.w1.wpa_supplicant1
Exec=/sbin/wpa_supplicant -B -P /run/sendsigs.omit.d/wpasupplicant.pid
-u -s -O /var/run/wpa_supplicant
User=root

-ram


On Thu, Sep 24, 2015 at 7:57 PM, Dan Williams <dcbw redhat com> wrote:
Since NM couldn't talk to the
supplicant, it will essentially ignore the WiFi interfaces and keep them
in the "unavailable" state.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]