mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
ipv6_netif: fix ng_ipv6_netif_find_best_src_addr() for multicast
Without this fix ng_ipv6_netif_find_best_src_addr() will return :: for most multicast addresses
This commit is contained in:
parent
7be7e00ab9
commit
e93b8a11ed
@ -313,7 +313,8 @@ static uint8_t _find_by_prefix_unsafe(ng_ipv6_addr_t **res, ng_ipv6_netif_t *ifa
|
||||
|
||||
match = ng_ipv6_addr_match_prefix(&(iface->addrs[i].addr), addr);
|
||||
|
||||
if (match < iface->addrs[i].prefix_len) {
|
||||
if (only_unicast && !ng_ipv6_addr_is_multicast(addr) &&
|
||||
(match < iface->addrs[i].prefix_len)) {
|
||||
/* match but not of same subnet */
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user