mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
udev: link_config - ignore errors due to missing MAC address
Otherwis, we get misleading error messages on links with MACs. Reported by Leonid Isaev.
This commit is contained in:
parent
3dde3f8197
commit
a669ea9860
@ -383,7 +383,9 @@ int link_config_apply(link_config_ctx *ctx, link_config *config, struct udev_dev
|
||||
case MACPOLICY_PERSISTENT:
|
||||
if (mac_is_random(device)) {
|
||||
r = get_mac(device, false, &generated_mac);
|
||||
if (r < 0)
|
||||
if (r == -ENOENT)
|
||||
break;
|
||||
else if (r < 0)
|
||||
return r;
|
||||
mac = &generated_mac;
|
||||
}
|
||||
@ -391,7 +393,9 @@ int link_config_apply(link_config_ctx *ctx, link_config *config, struct udev_dev
|
||||
case MACPOLICY_RANDOM:
|
||||
if (!mac_is_random(device)) {
|
||||
r = get_mac(device, true, &generated_mac);
|
||||
if (r < 0)
|
||||
if (r == -ENOENT)
|
||||
break;
|
||||
else if (r < 0)
|
||||
return r;
|
||||
mac = &generated_mac;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user