mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-07 06:03:51 +00: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.
(cherry picked from commit a669ea9860)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
14c30a407a
commit
0afeabd2ab
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user