summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-02-04 10:08:12 +0100
committerTom Gundersen <teg@jklm.no>2015-02-05 11:50:34 +0100
commit6a24f1484fcc1f59f89617afbe4282667a358eab (patch)
treec0a1d3b5d0d9b44e958c135456df730359aa6c03 /src/network/networkd-link.c
parent73432d67b590c8c8954cf2f8954d174a55d58c7b (diff)
networkd: don't warn about missing links unnecessarily
If we get a NEWLINK + NEWADDR between enumerating the links and enumerating the addresses, we would get a warning that the link corresponding to the address does not exist. This is a false warning as both the NEWLINK and NEWADDR would be processed after enumerating completed, so drop it.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 22864bd403..077626cd17 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1492,7 +1492,10 @@ int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *use
} else {
r = link_get(m, ifindex, &link);
if (r < 0 || !link) {
- log_warning("rtnl: received address for nonexistent link (%d), ignoring", ifindex);
+ /* when enumerating we might be out of sync, but we will
+ * get the address again, so just ignore it */
+ if (!m->enumerating)
+ log_warning("rtnl: received address for nonexistent link (%d), ignoring", ifindex);
return 0;
}
}