diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2016-09-24 16:07:45 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-09-24 10:07:45 -0400 |
commit | f258e948434183a2f0a38b429bb9a2054d61d954 (patch) | |
tree | e7b82fb7152526b320f53678b93355449c6f64b1 /src/network | |
parent | eb93312810937b63bef884479ffb304452ce5385 (diff) |
networkd: do not drop config for pending interfaces (#4187)
While an interface is still being processed by udev, it is in state "pending",
instead of "unmanaged". We must not flush device configuration then.
Further fixes commit 3104883ddc24 after commit c436d55397.
Fixes #4186
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-link.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 1687d9bf31..9cd4aa2c39 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -2995,7 +2995,8 @@ static int link_carrier_lost(Link *link) { if (r < 0) return r; - if (link->state != LINK_STATE_UNMANAGED) { + if (!IN_SET(link->state, LINK_STATE_UNMANAGED, LINK_STATE_PENDING)) { + log_link_debug(link, "State is %s, dropping config", link_state_to_string(link->state)); r = link_drop_foreign_config(link); if (r < 0) return r; |