summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-08-31 12:36:55 +0200
committerGitHub <noreply@github.com>2016-08-31 12:36:55 +0200
commit0913b19332869d930c451303d9ed1fedc82bfaea (patch)
tree8e7af47c2868b1ca3b616f70f714569f17d4f8e6
parentd16a6c39f6b1b989bd62fb520e00585f3328c756 (diff)
parentc436d553973b43ec5e8cf2eab84dd3e9e334295f (diff)
networkd: do not drop config for unmanaged interfaces (#4033)
Flushing foreign configuration for unmanaged interfaces is outright evil, especially when it's a regular occurence with Wi-Fi. Fixes: 3104883ddc24 "networkd: remove route if carrier is lost" Ref: #3831
-rw-r--r--src/network/networkd-link.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 71484e3288..aab40a0eb1 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -2957,9 +2957,11 @@ static int link_carrier_lost(Link *link) {
if (r < 0)
return r;
- r = link_drop_foreign_config(link);
- if (r < 0)
- return r;
+ if (link->state != LINK_STATE_UNMANAGED) {
+ r = link_drop_foreign_config(link);
+ if (r < 0)
+ return r;
+ }
r = link_handle_bound_by_list(link);
if (r < 0)