summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorMantas Mikulėnas <grawity@gmail.com>2016-08-24 18:26:48 +0300
committerMantas Mikulėnas <grawity@gmail.com>2016-08-25 13:25:08 +0300
commitc436d553973b43ec5e8cf2eab84dd3e9e334295f (patch)
tree1bf462f2c41b9680c0f0a30c60de59bd95169ff3 /src/network
parent3dea75dead5d3b229c9780de63479ea0aa655ba5 (diff)
networkd: do not drop config for unmanaged interfaces
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
Diffstat (limited to 'src/network')
-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)