diff options
author | Tom Gundersen <teg@jklm.no> | 2015-02-06 08:36:17 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-02-06 08:37:13 +0100 |
commit | 1c25683e0f40c6169676cc44fa1897082597feec (patch) | |
tree | 6b8dd67e9ae2c381bf1e421ce668b49c9d774ba6 /src/udev/net | |
parent | ee46e555702715f1adcc3381dac73e76e2d9a048 (diff) |
udev: net_setup - clarify reason for failure of persistent mac address policy
Diffstat (limited to 'src/udev/net')
-rw-r--r-- | src/udev/net/link-config.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c index ad5b956358..8b3dc45d4e 100644 --- a/src/udev/net/link-config.c +++ b/src/udev/net/link-config.c @@ -438,9 +438,10 @@ int link_config_apply(link_config_ctx *ctx, link_config *config, case MACPOLICY_PERSISTENT: if (mac_is_random(device)) { r = get_mac(device, false, &generated_mac); - if (r == -ENOENT) + if (r == -ENOENT) { + log_warning_errno(r, "Could not generate persistent MAC address for %s: %m", old_name); break; - else if (r < 0) + } else if (r < 0) return r; mac = &generated_mac; } @@ -448,9 +449,10 @@ int link_config_apply(link_config_ctx *ctx, link_config *config, case MACPOLICY_RANDOM: if (!mac_is_random(device)) { r = get_mac(device, true, &generated_mac); - if (r == -ENOENT) + if (r == -ENOENT) { + log_warning_errno(r, "Could not generate random MAC address for %s: %m", old_name); break; - else if (r < 0) + } else if (r < 0) return r; mac = &generated_mac; } |