zephyr/subsys/net
Jukka Rissanen aef83fce14 net: if: Allow selecting deprecated IPv6 address as src addr
This adjust the IPv6 source address selection so that it is possible
to select deprecated IPv6 address if no better preferred address is found.

From RFC 6724 chapter 5:

   Rule 3: Avoid deprecated addresses.
   If one of the two source addresses is "preferred" and one of them is
   "deprecated" (in the RFC 4862 sense), then prefer the one that is
   "preferred".

   Rule 8: Use longest matching prefix.
   If CommonPrefixLen(SA, D) > CommonPrefixLen(SB, D), then prefer SA.
   Similarly, if CommonPrefixLen(SB, D) > CommonPrefixLen(SA, D), then
   prefer SB.

So the fix allows deprecated address to be selected if it is a better
match than the preferred one. The reasoning here is that an address with
a longer matching prefix is generally considered topologically closer to
the destination. Using such a source address can lead to more efficient
routing, as it's more likely that the source and destination are within
the same network segment or a closely related one.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-25 19:00:59 +02:00
..
conn_mgr
ip net: if: Allow selecting deprecated IPv6 address as src addr 2025-04-25 19:00:59 +02:00
l2 wifi: fix -Wignored-qualifiers warning 2025-04-25 18:58:25 +02:00
lib net: lib: sockets: Increase socketpair mem pool size 2025-04-25 15:57:25 +02:00
pkt_filter net: pkt_filter: Add VLAN support to filtering 2025-04-16 08:07:34 +02:00
CMakeLists.txt net: silence no sources cmake warning 2024-10-18 14:14:56 +02:00
hostname.c
Kconfig
Kconfig.hostname
Kconfig.template.log_config.default.net
Kconfig.template.log_config.net