summaryrefslogtreecommitdiff
path: root/src/core/loopback-setup.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-12-06 18:16:16 +0100
committerTom Gundersen <teg@jklm.no>2013-12-16 17:28:18 +0100
commitfc25d7f8050f262fa6cafeb2a1032e6eb3e7b412 (patch)
tree97369539c35eacfa87c33e859bea8f7acd267223 /src/core/loopback-setup.c
parent23a7f0f721ff4e3b3fd4ed87f7d8e01ebad20093 (diff)
rtnl: simplify link_new()
Drop most of the arguments and instead introduce link_set_{flags,type}.
Diffstat (limited to 'src/core/loopback-setup.c')
-rw-r--r--src/core/loopback-setup.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/loopback-setup.c b/src/core/loopback-setup.c
index 5172a6984b..7bb20ecabe 100644
--- a/src/core/loopback-setup.c
+++ b/src/core/loopback-setup.c
@@ -89,7 +89,11 @@ static int start_interface(sd_rtnl *rtnl, int if_loopback, uint32_t ipv4_address
_cleanup_sd_rtnl_message_unref_ sd_rtnl_message *req = NULL;
int r;
- r = sd_rtnl_message_link_new(RTM_NEWLINK, if_loopback, 0, IFF_UP, &req);
+ r = sd_rtnl_message_link_new(RTM_NEWLINK, if_loopback, &req);
+ if (r < 0)
+ return r;
+
+ r = sd_rtnl_message_link_set_flags(req, IFF_UP);
if (r < 0)
return r;