mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-26 15:03:53 +01:00
When source address selection is done, both RFC and comments in the code state, that a longest prefix match should *only* be used as a tie-breaker between more than one viable candidate. If there is only one address, there is a) no need for a tie-breaker b) in the case of either the destination address or the single remaining address being ULAs ([which are considered to be of global scope] [RFC4193]) possibly not matching, as `fd00::/7` and e.g. `2001::/8` do not have a common prefix. (b) in fact causes the match function to return -1, causing the source address selection to return -1, causing the outer function to return the first address it found (which most often is the link-local address), causing e.g. a ping to an ULA to fail, even is there is a global address. [RFC4193]: https://tools.ietf.org/html/rfc4193