From 02e286219479ffa70ffeed5203d12e7fd831d9df Mon Sep 17 00:00:00 2001 From: Damjan Georgievski Date: Mon, 4 Jan 2016 22:04:17 +0100 Subject: 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 --- src/network/networkd-link.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/network/networkd-link.c') diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 9811526c6d..fb09dbded9 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -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; -- cgit v1.2.3-54-g00ecf