]> git.ipfire.org Git - thirdparty/systemd.git/commit
networkd: Do not treat IPv6 addresses IFA_F_DEPRECATED as not ready.
authorSusant Sahani <susant@redhat.com>
Tue, 26 Sep 2017 10:54:26 +0000 (16:24 +0530)
committerSusant Sahani <susant@redhat.com>
Tue, 26 Sep 2017 10:54:26 +0000 (16:24 +0530)
commitb7ed5384ab55cd4d7b8d7d1ec7f5d5e145f0a2b1
treed3d595385b9af3f87f5f1f7337af3775c25bd61f
parentf39c13e093e4dac74114f3d96596cd83977b81f8
networkd: Do not treat IPv6 addresses IFA_F_DEPRECATED as not ready.

When we are receiving address lifetime valid and lifetime preferred
'0' we set them via ndisc. That makes is shows as depricated and we
treat this as not ready.

In link_check_ready we look for whether address is depricated and
since this is depricated we never configure this link.

Thanks to Marc Haber <mh+github@zugschlus.de>

lifetime 0 a valid, and common, use case. It enables an installation to
autoconfigure systems in a way that they become immediately reachable
without needing local configuration after they have been turned on (for
example, for remote configuration).  The local admin can then configure
additional, static IP addresses to be used for the server's service (and
the IP adress _only_, while the rest of network configuration still comes
from autoconfiguration), while _KEEPING_ the possibiltiy to reach the
system over the autoconfigured address in the case that static
configuration fails.

The correct way is to handle the announcement exactly as it is correctly
handled in the released software: It configures the address as
"deprecated", causing the kernel to accept packets addresses to it, and
not to use it for outgoing packets/connections _UNLESS_ there is no other
way to send the packet out.

The only change that is needed is that systemd-networkd should not wedge
itself in that case, it should just continue working (with two IP
addresses configured on the interface).

An IPv6 address with a remamining lifetime of zero is _NOT_ like an
expired IPv4 DHCP lease, it's still a valid and useable IP address. It
is just that the network advises the host not to use the address any
more for outgoing traffic _UNLESS_ there is no other way to send the
traffic.

Fixes #6359
src/network/networkd-address.c