[systemd-commits] src/udev

Tom Gundersen tomegun at kemper.freedesktop.org
Mon Jul 7 06:03:27 PDT 2014


 src/udev/net/link-config.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit a669ea9860900d5cdebbc4cb9aaea72db7e28a02
Author: Tom Gundersen <teg at jklm.no>
Date:   Mon Jul 7 14:50:16 2014 +0200

    udev: link_config - ignore errors due to missing MAC address
    
    Otherwis, we get misleading error messages on links with MACs.
    
    Reported by Leonid Isaev.

diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index b8650a6..5a45c53 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;
                         }



More information about the systemd-commits mailing list