From bcb685c4cb2b126f4a8593083fed043aed74ed17 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. --- 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 c424aa3194..64b0065e8d 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -12177,7 +12177,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 535d6ea7d5..cfd9785dbd 100644 --- a/src/nm-config.c +++ b/src/nm-config.c @@ -406,7 +406,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;