diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2017-11-16 09:23:12 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2017-11-17 18:19:32 +0100 |
commit | 60334a2893fe27241151acb4d022bf685c664c62 (patch) | |
tree | a23be807860d9bd4fb57900440b629f869be0e62 | |
parent | 9e41ed446176acc3f82cf23c3b6d7692ffa7b5b3 (diff) | |
download | NetworkManager-60334a2893fe27241151acb4d022bf685c664c62.tar.gz |
device: don't touch external devices
If a device is 'external' (which means that NM generated an in-memory
connection to only to track the device state) we should not change its
IP configuration.
https://bugzilla.redhat.com/show_bug.cgi?id=1512316
-rw-r--r-- | src/devices/nm-device.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 8816953971..485d695167 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -5813,6 +5813,9 @@ ip4_config_merge_and_apply (NMDevice *self, GSList *iter; gs_unref_ptrarray GPtrArray *ip4_dev_route_blacklist = NULL; + if (nm_device_sys_iface_state_is_external (self)) + commit = 0; + /* Apply ignore-auto-routes and ignore-auto-dns settings */ connection = nm_device_get_applied_connection (self); if (connection) { @@ -6476,6 +6479,9 @@ ip6_config_merge_and_apply (NMDevice *self, const char *token = NULL; GSList *iter; + if (nm_device_sys_iface_state_is_external (self)) + commit = 0; + /* Apply ignore-auto-routes and ignore-auto-dns settings */ connection = nm_device_get_applied_connection (self); if (connection) { |