summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-link.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 2f99b5374a..0f2004d717 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1139,9 +1139,6 @@ static int link_update_flags(Link *link, sd_rtnl_message *m) {
assert(link);
- if (link->state == LINK_STATE_FAILED)
- return 0;
-
r = sd_rtnl_message_link_get_flags(m, &flags);
if (r < 0) {
log_warning_link(link, "Could not get link flags");
@@ -1232,6 +1229,10 @@ static int link_update_flags(Link *link, sd_rtnl_message *m) {
link_save(link);
+ if (link->state == LINK_STATE_FAILED ||
+ link->state == LINK_STATE_UNMANAGED)
+ return 0;
+
if (carrier_gained) {
log_info_link(link, "gained carrier");
@@ -1621,9 +1622,6 @@ int link_update(Link *link, sd_rtnl_message *m) {
assert(link->ifname);
assert(m);
- if (link->state == LINK_STATE_FAILED || link->state == LINK_STATE_UNMANAGED)
- return 0;
-
r = sd_rtnl_message_read_string(m, IFLA_IFNAME, &ifname);
if (r >= 0 && !streq(ifname, link->ifname)) {
log_info_link(link, "renamed to %s", ifname);