diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2015-12-14 12:49:35 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2015-12-14 12:49:35 +0100 |
commit | a22a109ad6a56b439f3f19c289b0c45dcd4fdf6d (patch) | |
tree | 2486245d2eba3596209dbad217af9b8ed1052c9a | |
parent | 174d66a3d020015a3e29da902074790a1abe2774 (diff) | |
download | NetworkManager-a22a109ad6a56b439f3f19c289b0c45dcd4fdf6d.tar.gz |
device: reset autoconnect when the device unrealizes
Fixes autoconnect after the device is realized again:
# nmcli c add type team
# nmcli c up team
# nmcli d dis nm-team # autoconnect is blocked
# nmcli c del team # the is unrealized
# nmcli c add type team # the device is realized again, not
# activating with the new connection
-rw-r--r-- | src/devices/nm-device.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index cf7fd6e6ee..402b977ff7 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -135,6 +135,8 @@ enum { LAST_PROP }; +#define DEFAULT_AUTOCONNECT TRUE + /***********************************************************/ #define PENDING_ACTION_DHCP4 "dhcp4" @@ -2057,6 +2059,8 @@ nm_device_unrealize (NMDevice *self, gboolean remove_resources, GError **error) priv->real = FALSE; g_object_notify (G_OBJECT (self), NM_DEVICE_REAL); + nm_device_set_autoconnect (self, DEFAULT_AUTOCONNECT); + g_object_thaw_notify (G_OBJECT (self)); nm_device_state_changed (self, @@ -10064,8 +10068,6 @@ _activation_func_to_string (ActivationHandleFunc func) /***********************************************************/ -#define DEFAULT_AUTOCONNECT TRUE - static void nm_device_init (NMDevice *self) { |