diff options
author | Dan Winship <danw@gnome.org> | 2014-01-03 14:04:54 -0500 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-01-23 15:15:00 -0500 |
commit | 971167e2a8693c75e84854a030ba491932b7d105 (patch) | |
tree | 476ba361a73e7d5d94faa587b01aeeaad26a0dcf | |
parent | c4fc72c795c144fb540b5fd056b4cbbaae60b6e1 (diff) | |
download | NetworkManager-971167e2a8693c75e84854a030ba491932b7d105.tar.gz |
core: disable auto-re-connect of intentionally-disconnected connection
If a connection is disconnected by the user, don't allow it to
autoconnect again immediately after.
-rw-r--r-- | src/nm-policy.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nm-policy.c b/src/nm-policy.c index bcf36ce762..01ddc15436 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -1431,6 +1431,10 @@ device_state_changed (NMDevice *device, if (old_state > NM_DEVICE_STATE_DISCONNECTED) update_routing_and_dns (policy, FALSE); break; + case NM_DEVICE_STATE_DEACTIVATING: + if (reason == NM_DEVICE_STATE_REASON_USER_REQUESTED) + nm_settings_connection_set_autoconnect_blocked_reason (connection, NM_DEVICE_STATE_REASON_USER_REQUESTED); + break; case NM_DEVICE_STATE_DISCONNECTED: /* Reset retry counts for a device's connections when carrier on; if cable * was unplugged and plugged in again, we should try to reconnect. |