network: always drop configs when corresponding network file does not exist
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 16 Feb 2019 18:57:13 +0000 (03:57 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 17 Feb 2019 21:11:50 +0000 (06:11 +0900)
Follow-up for 93b4dab57e2e13bd804cbee999241be65a443e2e.

Fixes #11724.

src/network/networkd-link.c

index ae3b8cc..64ebcf4 100644 (file)
@@ -3565,7 +3565,7 @@ static int link_carrier_lost(Link *link) {
 
         assert(link);
 
-        if (link->network->ignore_carrier_loss)
+        if (link->network && link->network->ignore_carrier_loss)
                 return 0;
 
         /* Some devices reset itself while setting the MTU. This causes the DHCP client fall into a loop.