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 bcb685c4cb)
This commit is contained in:
Lubomir Rintel 2016-10-11 07:47:25 +00:00 committed by Thomas Haller
parent b071c91eef
commit bb5ee41dc4
2 changed files with 2 additions and 2 deletions

View file

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

View file

@ -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;