summaryrefslogtreecommitdiff
path: root/src/udev/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev/net')
-rw-r--r--src/udev/net/link-config.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index b8650a6c6c..5a45c53cc6 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -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;
}