chiark / gitweb /
network: use SETLINK to bring up interfaces
authorTom Gundersen <teg@jklm.no>
Mon, 16 Dec 2013 13:37:51 +0000 (14:37 +0100)
committerTom Gundersen <teg@jklm.no>
Mon, 16 Dec 2013 16:28:19 +0000 (17:28 +0100)
src/core/loopback-setup.c
src/network/networkd-link.c

index 1999959..a1b3847 100644 (file)
@@ -89,7 +89,7 @@ static int start_interface(sd_rtnl *rtnl, int if_loopback, struct in_addr *ipv4_
         _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *req = NULL;
         int r;
 
-        r = sd_rtnl_message_link_new(RTM_NEWLINK, if_loopback, &req);
+        r = sd_rtnl_message_link_new(RTM_SETLINK, if_loopback, &req);
         if (r < 0)
                 return r;
 
index 16255f9..7684d65 100644 (file)
@@ -301,9 +301,9 @@ static int link_up(Link *link) {
         assert(link->manager);
         assert(link->manager->rtnl);
 
-        r = sd_rtnl_message_link_new(RTM_NEWLINK, link->ifindex, &req);
+        r = sd_rtnl_message_link_new(RTM_SETLINK, link->ifindex, &req);
         if (r < 0) {
-                log_error("Could not allocate RTM_NEWLINK message");
+                log_error("Could not allocate RTM_SETLINK message");
                 return r;
         }