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 3104883ddc after commit c436d55397.

Fixes #4186
This commit is contained in:
Martin Pitt 2016-09-24 16:07:45 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent eb93312810
commit f258e94843
1 changed files with 2 additions and 1 deletions

View File

@ -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;