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
This commit is contained in:
Beniamino Galvani
2017-11-16 09:23:12 +01:00
parent 9e41ed4461
commit 60334a2893

View File

@@ -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) {