From bb5ee41dc440709c3f2e0a3e498ab70fde4cea1a Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Tue, 11 Oct 2016 07:47:25 +0000 Subject: [PATCH] config: allow fallback to fake permanent address for default wired connections The default wired connection is already generated allowing the use of a fake address, but for the state file and the device matching specs only non-fake addresses are used. Let's allow fake addresses consistently, so that default wired connections work properly in containers (where the veth address is considered fake) as well. Also, it would really be a better idea to use ifnames everywhere instead, but that would change the format of the state file. (cherry picked from commit bcb685c4cb2b126f4a8593083fed043aed74ed17) --- src/devices/nm-device.c | 2 +- src/nm-config.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index db617c0be6..ff253dd45c 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -12048,7 +12048,7 @@ spec_match_list (NMDevice *self, const GSList *specs) } } - hw_addr_perm = nm_device_get_permanent_hw_address (self, FALSE); + hw_addr_perm = nm_device_get_permanent_hw_address (self, TRUE); if (hw_addr_perm) { m = nm_match_spec_hwaddr (specs, hw_addr_perm); matched = MAX (matched, m); diff --git a/src/nm-config.c b/src/nm-config.c index 4bc4f48340..3823e34b3d 100644 --- a/src/nm-config.c +++ b/src/nm-config.c @@ -399,7 +399,7 @@ nm_config_set_no_auto_default_for_device (NMConfig *self, NMDevice *device) priv = NM_CONFIG_GET_PRIVATE (self); - hw_address = nm_device_get_permanent_hw_address (device, FALSE); + hw_address = nm_device_get_permanent_hw_address (device, TRUE); if (!hw_address) return;