Currently when both ipv4ll and dhcp are enabled, ipv4ll address (if one has been claimed) is removed when dhcp address is aquired. This is not the best thing to do since there might be clients unaware of the removal trying to communicate.
This patch provides a smooth transition between ipv4ll and dhcp. If ipv4ll address was claimed [1] before dhcp, address is marked as deprecated. Deprecated address is still a valid address and packets can be received on it but address cannot be selected as a source address. If dhcp lease cannot be extended, then ipv4ll address is marked as valid again.
[1] If there is no collision, claiming IPv4LL takes between 4 to 7 seconds.
aba496a networkd: smooth transition from ipv4ll to dhcp address
TODO | 1 -
man/systemd.network.xml | 5 +-
src/libsystemd-network/sd-ipv4ll.c | 6 +++
src/libsystemd/sd-rtnl/rtnl-message.c | 50 +++++++++++++++++
src/libsystemd/sd-rtnl/rtnl-types.c | 2 +-
src/libsystemd/sd-rtnl/rtnl-types.h | 1 +
src/libsystemd/sd-rtnl/test-rtnl.c | 2 +
src/network/networkd-address.c | 96 +++++++++++++++++++++++++++++++--
src/network/networkd-link.c | 94 ++++++++++++++++++++++++++++----
src/network/networkd.h | 4 ++
src/systemd/sd-ipv4ll.h | 12 +++--
src/systemd/sd-rtnl.h | 3 ++
12 files changed, 253 insertions(+), 23 deletions(-)
Upstream: github.com