]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: do not drop config for pending interfaces (#4187)
authorMartin Pitt <martin.pitt@ubuntu.com>
Sat, 24 Sep 2016 14:07:45 +0000 (16:07 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 24 Sep 2016 14:07:45 +0000 (10:07 -0400)
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

src/network/networkd-link.c

index 1687d9bf319e46eccc7fe9e33e9438182546bdab..9cd4aa2c39caf95fe67b8304096f3c8e0b31cfb3 100644 (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;