After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 726239 - [review] jk/dev-disconnect: fix a regression in manual device disconnection
[review] jk/dev-disconnect: fix a regression in manual device disconnection
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-03-13 13:47 UTC by Jiri Klimes
Modified: 2014-03-13 15:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jiri Klimes 2014-03-13 13:47:37 UTC
Devices disconnected explicitly by user should stay disconnected, preventing
auto-connecting until manual request.

Introduction of NM_DEVICE_STATE_DEACTIVATING state broke this feature.

disconnect_cb() correctly set autoconnect device property to FALSE, however
nm_device_state_changed() put it to TRUE again. Thus only the active connection 
was blocked instead of the whole device.
Comment 1 Jiri Klimes 2014-03-13 13:51:37 UTC
A fix has been pushed to branch jk/dev-disconnect.
Comment 2 Dan Williams 2014-03-13 14:44:20 UTC
It looks like the switch() doesn't handle the FAILED case either.  The intent of the autoconnect=TRUE reset is that if the device is activating or connected, it gets reset to TRUE.  So we could either:

1) move the priv->autoconnect=TRUE into a separate if (state >= PREPARE && state <= ACTIVATED) priv->autoconnect=TRUE

2) add a FAILED case to the same block as DEACTIVATING
Comment 3 Dan Williams 2014-03-13 15:01:48 UTC
Looks good now (with option #1 implemented)
Comment 4 Jiri Klimes 2014-03-13 15:08:39 UTC
Pushed to master as:
b02353e core: fix a regression in manual device disconnection (bgo #726239)