NetworkManager/src/core/ndisc
Beniamino Galvani f58b281ef4 ndisc: accept unknown ip6-privacy value
The value can be unknown for different reasons:

 - we don't have a value saved in NMDevice's "ip6_saved_properties"
   because NM was restarted or because the device didn't have an
   ifindex when it became managed.

 - the value read from /proc is outside the allowed range (kernel
   allows "echo 42 > /proc/sys/net/ipv6/conf/enp1s0/use_tempaddr")

Note that the second case was already possible before commit
797f3cafee ('device: fall back to saved use_tempaddr value instead
of rereading /proc').

If we can't determine the previous value, pass "unknown" to ndisc; it
will generate a l3cd with "unknown" ip6-privacy, which means to not
set the value when committing the configuration.

Fixes: 797f3cafee ('device: fall back to saved use_tempaddr value instead of rereading /proc')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1907
2024-03-28 19:21:43 +01:00
..
tests ndisc/tests: fix reference counting in nm_fake_ndisc_new() 2023-01-05 12:13:39 +01:00
nm-fake-ndisc.c all: use NM_MAX() instead of MAX() 2023-11-15 09:32:21 +01:00
nm-fake-ndisc.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-lndp-ndisc.c all: use NM_MAX() instead of MAX() 2023-11-15 09:32:21 +01:00
nm-lndp-ndisc.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-ndisc-private.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-ndisc.c ndisc: accept unknown ip6-privacy value 2024-03-28 19:21:43 +01:00
nm-ndisc.h ndisc: Accept routes from on-link prefixes form ra 2023-01-23 16:50:08 +00:00