Skip to content

candidate: strip link-local ipv6 scope in local preference

This patch makes IPv6 link-local addresses obtain a unique ice local preference when computing their priority, by stripping the "%" added to them by getnameinfo(). Previously, all these addresses obtained the same preference value, since the whole local ips list was checked without finding a match, and the size of the list was returned as preference value. This behaviour however was masqueraded by the call to ensure_unique_priority().

This has been detected by the code snipped provided in !100 (merged), where two different IPv6 link-local addresses where given the same priority (with commits from !100 (merged) applied, specifically with the removal of ensure_unique_priority()).

Merge request reports