For now handle only multicast addresses, we still use routes to

LLA unicasts yet.

Sponsored by:	Yandex LLC
This commit is contained in:
Andrey V. Elsukov 2014-11-10 10:59:08 +00:00
parent 7c644b8482
commit 45d1880a36

View File

@ -586,18 +586,6 @@ selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
} else
goto getroute;
}
/*
* If destination address is LLA or link- or node-local multicast,
* use it's embedded scope zone id to determine outgoing interface.
*/
if (IN6_IS_SCOPE_LINKLOCAL(dst) ||
IN6_IS_ADDR_MC_NODELOCAL(dst)) {
zoneid = ntohs(in6_getscope(dst));
if (zoneid > 0) {
ifp = in6_getlinkifnet(zoneid);
goto done;
}
}
/*
* If the destination address is a multicast address and the outgoing
* interface for the address is specified by the caller, use it.
@ -606,6 +594,18 @@ selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
mopts != NULL && (ifp = mopts->im6o_multicast_ifp) != NULL) {
goto done; /* we do not need a route for multicast. */
}
/*
* If destination address is LLA or link- or node-local multicast,
* use it's embedded scope zone id to determine outgoing interface.
*/
if (IN6_IS_ADDR_MC_LINKLOCAL(dst) ||
IN6_IS_ADDR_MC_NODELOCAL(dst)) {
zoneid = ntohs(in6_getscope(dst));
if (zoneid > 0) {
ifp = in6_getlinkifnet(zoneid);
goto done;
}
}
getroute:
/*