chiark / gitweb /
networkd: link - clarify log message when receiving address for unknown link
[elogind.git] / src / network / networkd-link.c
index 1b7b1898c4e13bd4907ea2a5e353a3e94435a59e..bcd2e6da519a6ac12a73b94518275ffe97b43864 100644 (file)
@@ -1250,6 +1250,12 @@ static int link_initialized_and_synced(sd_rtnl *rtnl, sd_rtnl_message *m,
         } else if (r < 0)
                 return r;
 
+        if (link->flags & IFF_LOOPBACK) {
+                log_debug_link(link, "matching network ignored for loopback link");
+                link_enter_unmanaged(link);
+                return 1;
+        }
+
         r = network_apply(link->manager, network, link);
         if (r < 0)
                 return r;
@@ -1330,7 +1336,7 @@ int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message,
         } else {
                 r = link_get(m, ifindex, &link);
                 if (r < 0 || !link) {
-                        log_warning("rtnl: received address for a nonexistent link, ignoring");
+                        log_warning("rtnl: received address for a nonexistent link (%d), ignoring", ifindex);
                         return 0;
                 }
         }