chiark / gitweb /
networkd: link - don't log errors when missing routes/addresses are dropped
authorTom Gundersen <teg@jklm.no>
Fri, 9 May 2014 12:23:17 +0000 (14:23 +0200)
committerTom Gundersen <teg@jklm.no>
Fri, 9 May 2014 12:41:27 +0000 (14:41 +0200)
We were ignoring the wrong errno.

src/network/networkd-link.c

index d23be9c..f1f04a3 100644 (file)
@@ -420,7 +420,7 @@ static int route_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata)
         }
 
         r = sd_rtnl_message_get_errno(m);
-        if (r < 0 && r != -ENOENT)
+        if (r < 0 && r != -ESRCH)
                 log_struct_link(LOG_WARNING, link,
                                 "MESSAGE=%s: could not drop route: %s",
                                 link->ifname, strerror(-r),
@@ -623,7 +623,7 @@ static int address_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdat
         }
 
         r = sd_rtnl_message_get_errno(m);
-        if (r < 0 && r != -ENOENT)
+        if (r < 0 && r != -EADDRNOTAVAIL)
                 log_struct_link(LOG_WARNING, link,
                                 "MESSAGE=%s: could not drop address: %s",
                                 link->ifname, strerror(-r),