summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-11-25 20:56:46 +0100
committerTom Gundersen <teg@jklm.no>2015-11-25 20:56:46 +0100
commitac7653a43314aed75ba6d9516cd596000a7355f9 (patch)
treea64cf2ee6920721c67b92b4ffeea31ffa0146977 /src/network
parentaf143e3b692fbba2e68efd2c834711ba518f547a (diff)
parente5d44b34cca39a335b8976328a14f47e2d7ef3b9 (diff)
Merge pull request #2024 from eworm-de/net
networkd: link - do not drop config for loopback device
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-link.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 64a4b74e15..a9d91b07f6 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -2040,9 +2040,13 @@ static int link_configure(Link *link) {
assert(link->network);
assert(link->state == LINK_STATE_PENDING);
- r = link_drop_foreign_config(link);
- if (r < 0)
- return r;
+ /* Drop foreign config, but ignore loopback device.
+ * We do not want to remove loopback address. */
+ if (!(link->flags & IFF_LOOPBACK)) {
+ r = link_drop_foreign_config(link);
+ if (r < 0)
+ return r;
+ }
r = link_set_bridge_fdb(link);
if (r < 0)