mirror of
https://github.com/systemd/systemd.git
synced 2025-03-23 10:50:16 +03:00
networkd: link - do not drop config for critical interfaces
the idea is that interfaces marked as critical are typically used for NFS root. networkd shouldn't drop that config. discussion at #780
This commit is contained in:
parent
d7a2f11bb9
commit
02e2862194
@ -2039,9 +2039,9 @@ static int link_configure(Link *link) {
|
||||
assert(link->network);
|
||||
assert(link->state == LINK_STATE_PENDING);
|
||||
|
||||
/* Drop foreign config, but ignore loopback device.
|
||||
* We do not want to remove loopback address. */
|
||||
if (!(link->flags & IFF_LOOPBACK)) {
|
||||
/* Drop foreign config, but ignore loopback or critical devices.
|
||||
* We do not want to remove loopback address or addresses used for root NFS. */
|
||||
if (!(link->flags & IFF_LOOPBACK) && !(link->network->dhcp_critical)) {
|
||||
r = link_drop_foreign_config(link);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
Loading…
x
Reference in New Issue
Block a user