Skip to content

Commit

Permalink
networkd: link - do not drop config for loopback device
Browse files Browse the repository at this point in the history
Commit 5e5b137 (networkd: link - drop foreign config when configuring
link) introduced a regression where addresses (including 127.0.0.1) are
removed from loopback device.
Do not handle loopback device when removing foreign configs.

Signed-off-by: Christian Hesse <mail@eworm.de>
  • Loading branch information
eworm-de committed Nov 25, 2015
1 parent af143e3 commit e5d44b3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/network/networkd-link.c
Expand Up @@ -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)
Expand Down

0 comments on commit e5d44b3

Please sign in to comment.