network: use SETLINK to bring up interfaces
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user