]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/network/networkd-link.c
Merge pull request #2267 from gdamjan/dont-drop-critical
[thirdparty/systemd.git] / src / network / networkd-link.c
index 10fec5e75f3347fde0487a60109059a056f3a9fb..bbda691c083a56e1cf4f54047d5e7c4b80fc5d7c 100644 (file)
@@ -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;