summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-link.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 9fb8d9f1fc..a97e3473ec 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1056,16 +1056,14 @@ static int link_up_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
return 1;
r = sd_rtnl_message_get_errno(m);
- if (r < 0)
+ if (r >= 0)
+ link_update_flags(link, link->flags | IFF_UP);
+ else
log_struct_link(LOG_WARNING, link,
"MESSAGE=%s: could not bring up interface: %s",
link->ifname, strerror(-r),
"ERRNO=%d", -r,
NULL);
- return 1;
-
- link_update_flags(link, link->flags | IFF_UP);
-
return 1;
}