summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-07-07 14:50:16 +0200
committerTom Gundersen <teg@jklm.no>2014-07-07 15:03:12 +0200
commita669ea9860900d5cdebbc4cb9aaea72db7e28a02 (patch)
tree42d4c7c612f271e9c5670952dc660394611769b7 /src
parent3dde3f819732aaa66ab8e881305488adaea17641 (diff)
udev: link_config - ignore errors due to missing MAC address
Otherwis, we get misleading error messages on links with MACs. Reported by Leonid Isaev.
Diffstat (limited to 'src')
-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;
}