Re: NM connects to a mobile network even if "Mobile network" in tray icon's context menu is unchecked



On 07/30/2011 06:58 PM, Dan Williams wrote:
> Yeah, I think your analysis is correct.  It would seem really odd to me
> to auto-activate a mobile broadband connection if the MB is not enabled.
> If MB is not enabled, only a user action should enable it.  Thanks fro
> checking this out.

No problem. :)

So, when the user disables wifi, we transition the wifi devices to
NM_DEVICE_STATE_UNAVAILABLE.  This is what prevents nm-policy from
trying to autoconnect them.  It also means that ActivateConnection calls
will fail (unnecessarily perhaps) for those devices, but for wifi we can
live with that.

But we can't live with that for modems.  This means we've been leaving
"disabled" modems at NM_DEVICE_STATE_DISCONNECTED, so nm-policy happily
autoconnects them.

Lots of ways I can think of to fix this, I'm currently torn between
these two:

1) Have nm-policy:schedule_activate_check explicitly check radio states
as appropriate.

2) Add a new device state, say NM_DEVICE_STATE_STANDBY = 25 (between
UNAVAILABLE and DISCONNECTED), indicating that we can use the device but
we have decided not to.  Devices in NM_DEVICE_STATE_STANDBY won't be
autoconnected, but a manual activation request is expected to work.

Thoughts?  Thanks!

Later,
Daniel

P.S. when we have an ActivateConnection on a disabled modem, we'll also
want to mark the wwan radios as enabled and ensure that the caller has
the polkit permission to enable wwan radios.  We don't seem to do that.


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