summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/network/networkd-link.c9
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py1
2 files changed, 9 insertions, 1 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index ab74260adb..f9047103c0 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1136,6 +1136,15 @@ static int link_drop_dynamic_config(Link *link, Network *network) {
link->lldp_rx = sd_lldp_rx_unref(link->lldp_rx); /* TODO: keep the received neighbors. */
link->lldp_tx = sd_lldp_tx_unref(link->lldp_tx);
+ /* Even if we do not release DHCP lease or so, reset 'configured' flags. Otherwise, e.g. if
+ * previously UseDNS= was disabled but is now enabled, link will enter configured state before
+ * expected DNS servers being acquired. */
+ link->ipv4ll_address_configured = false;
+ link->dhcp4_configured = false;
+ link->dhcp6_configured = false;
+ link->dhcp_pd_configured = false;
+ link->ndisc_configured = false;
+
return r;
}
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index 8ee94a0294..59503d31a1 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -6705,7 +6705,6 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
'--dhcp-option=option6:ntp-server,[2600::ff]')
networkctl_reload()
- networkctl_reconfigure('veth99') # Release previously acquired lease and start new DHCPv6 handshake.
self.wait_online('veth99:routable', 'veth-peer:routable')
# checking address