1
0
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:
Martine Lenders 2015-05-22 17:19:26 +02:00
parent 7be7e00ab9
commit e93b8a11ed

View File

@ -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;
}