]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: it is not necessary to call RTM_GETLINK when carrier is gained
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 May 2021 04:43:05 +0000 (13:43 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 7 Jun 2021 21:39:48 +0000 (06:39 +0900)
src/network/networkd-link.c

index 848136dc67195a14a7992dc08e21c280673f0ab0..75707757443c2325fd504f24008a2c7ff4f527a4 100644 (file)
@@ -1618,7 +1618,7 @@ static int link_reconfigure_internal(Link *link, bool force) {
         if (r < 0)
                 return r;
 
-        return 0;
+        return 1;
 }
 
 static int link_reconfigure_handler_internal(sd_netlink *rtnl, sd_netlink_message *m, Link *link, bool force) {
@@ -1860,8 +1860,8 @@ static int link_carrier_gained(Link *link) {
         if (r < 0)
                 return r;
         if (r > 0) {
-                r = link_reconfigure(link, false);
-                if (r < 0)
+                r = link_reconfigure_internal(link, false);
+                if (r != 0)
                         return r;
         }