summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-05-07 16:42:47 +0200
committerTom Gundersen <teg@jklm.no>2014-05-07 16:54:02 +0200
commit99b4cc3e75e757c07d573e2f4c29f47393e24fa1 (patch)
tree7a8584b9792c986a7fa9b499bf0940f60a855bb5 /src
parentdeb2e5230b4dcbc0e2e02cc47a0b2d0d7179a044 (diff)
networkd: link - always maintain link operstate regardless of admin state
Diffstat (limited to 'src')
-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);