diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-bridge.c | 4 | ||||
-rw-r--r-- | src/network/networkd-link.c | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/network/networkd-bridge.c b/src/network/networkd-bridge.c index 1704f65ee6..b764b7d593 100644 --- a/src/network/networkd-bridge.c +++ b/src/network/networkd-bridge.c @@ -84,7 +84,7 @@ static int bridge_join_ready(Bridge *bridge, Link* link, sd_rtnl_message_handler assert(link); assert(callback); - r = sd_rtnl_message_link_new(RTM_SETLINK, link->ifindex, 0, 0, &req); + r = sd_rtnl_message_link_new(RTM_SETLINK, link->ifindex, &req); if (r < 0) { log_error("Could not allocate RTM_SETLINK message: %s", strerror(-r)); @@ -155,7 +155,7 @@ static int bridge_create(Bridge *bridge) { assert(bridge->manager); assert(bridge->manager->rtnl); - r = sd_rtnl_message_link_new(RTM_NEWLINK, 0, 0, 0, &req); + r = sd_rtnl_message_link_new(RTM_NEWLINK, 0, &req); if (r < 0) { log_error("Could not allocate RTM_NEWLINK message: %s", strerror(-r)); diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 8c7b0fc1ee..16255f9227 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -264,7 +264,7 @@ static int link_get(Link *link) { assert(link->manager); assert(link->manager->rtnl); - r = sd_rtnl_message_link_new(RTM_GETLINK, link->ifindex, 0, 0, &req); + r = sd_rtnl_message_link_new(RTM_GETLINK, link->ifindex, &req); if (r < 0) { log_error("Could not allocate RTM_GETLINK message"); return r; @@ -301,12 +301,18 @@ static int link_up(Link *link) { assert(link->manager); assert(link->manager->rtnl); - r = sd_rtnl_message_link_new(RTM_NEWLINK, link->ifindex, 0, IFF_UP, &req); + r = sd_rtnl_message_link_new(RTM_NEWLINK, link->ifindex, &req); if (r < 0) { log_error("Could not allocate RTM_NEWLINK message"); return r; } + r = sd_rtnl_message_link_set_flags(req, IFF_UP); + if (r < 0) { + log_error("Could not set link flags"); + return r; + } + r = sd_rtnl_call_async(link->manager->rtnl, req, link_up_handler, link, 0, NULL); if (r < 0) { log_error("Could not send rtnetlink message: %s", strerror(-r)); |