Based on a669ea9860900d5cdebbc4cb9aaea72db7e28a02 Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Mon, 7 Jul 2014 14:50:16 +0200
Subject: [PATCH] udev: link_config - ignore errors due to missing MAC address

Otherwis, we get misleading error messages on links with MACs.

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

--- src/udev/net/link-config.c
+++ src/udev/net/link-config.c	2014-07-08 10:44:19.450735575 +0000
@@ -440,7 +440,9 @@ int link_config_apply(link_config_ctx *c
                 case MACPOLICY_PERSISTENT:
                         if (!mac_is_permanent(device)) {
                                 r = get_mac(device, false, &generated_mac);
-                                if (r < 0)
+                                if (r == -ENOENT)
+                                        break;
+                                else if (r < 0)
                                         return r;
                                 mac = &generated_mac;
                         }
@@ -448,7 +450,9 @@ int link_config_apply(link_config_ctx *c
                 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;
                         }
