]> git.ipfire.org Git - thirdparty/systemd.git/commit
network: attempt to trigger kernel IPv6LL address generation
authorJoerie de Gram <j.de.gram@gmail.com>
Tue, 8 Feb 2022 13:56:26 +0000 (22:56 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 10 Feb 2022 08:35:41 +0000 (17:35 +0900)
commit77d65e5659b681209f15ca914cdc7a40e5ead48e
tree1d7814ced345f28737ecf244f4985b74919bf43f
parent2b25f4eb23194feb224eef7f5ef4b6a23d3dc032
network: attempt to trigger kernel IPv6LL address generation

Try to ensure kernel IPv6 link local address generation occurs by
setting the per-if addr_gen_mode sysctl when the link is already up,
instead of the netlink interface (IFLA_INET6_ADDR_GEN_MODE).

The netlink setting is sufficient in cases where the interface is not
yet up when networkd configures an interface - bringing the interface
up will trigger in-kernel address generation.

If the interface is already up, yet the interface has no IPv6LL assigned
setting IFLA_INET6_ADDR_GEN_MODE has no effect.

Writing the addr_gen_mode sysctl is a best effort attempt at triggering
address generation regardless of interface state because it also works
in cases where the interface is already up.

Fixes #22424.
src/network/networkd-ipv6ll.c
src/network/networkd-ipv6ll.h
src/network/networkd-setlink.c