networkd: link - do not drop config for loopback device
Commit 5e5b137a
(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>
This commit is contained in:
parent
af143e3b69
commit
e5d44b34cc
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue