1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00
Martine S. Lenders e787f6b60d gnrc_netif: only use prefix matching as tie-breaker in source selection
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
2019-10-24 16:04:41 +02:00
..
2018-04-05 14:39:59 +02:00
2018-05-28 15:43:41 -04:00
2019-10-08 20:58:52 +02:00
2018-06-11 19:12:02 +02:00
2018-10-18 13:37:21 +02:00
2018-06-15 00:34:33 +02:00
2019-05-16 12:01:36 +02:00
2019-09-09 20:27:16 +02:00
2019-09-13 11:37:44 +02:00
2018-08-24 18:14:03 +02:00
2017-07-03 10:55:35 +02:00
2019-06-05 17:10:26 +02:00
2018-10-03 10:44:14 +02:00
2019-04-12 15:51:15 +02:00