test-network: reconfigure interface cleanly to drop previous DHCP lease and friends
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 7 Nov 2024 00:52:03 +0000 (09:52 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 11 Nov 2024 02:53:24 +0000 (11:53 +0900)
commit130d66956ff7577233574fc26108dbdc4ce42d8c
tree69d9bd27704e8eef6a934e33fbb941d06dc41a90
parent52f46b77d7bafb7ce44f016e1793862873a3fc73
test-network: reconfigure interface cleanly to drop previous DHCP lease and friends

Follow-up for 451c2baf30f50b95d73e648058c7c2348dbf0c31.

With the commits, reloading .network files does not release previously
acquired DHCP lease and friends if possible.

On graceful reconfigure triggered by the reload, the interface may
acquire a new DHCPv4 lease earlier than DHCPv6 lease. In that case,
the check will fail as it is done with the new DHCPv4 lease and old
DHCPv6 lease, which does not contain any IPv6 DNS servers or so.
So, when switching from no -> yes, we need to wait a new lease with DNS
servers or so. To achieve that, we need to clean reconfigure the interface.
test/test-network/systemd-networkd-tests.py