summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
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)