aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet6/in6_src.c
diff options
context:
space:
mode:
authorAndrey V. Elsukov <ae@FreeBSD.org>2014-11-10 10:59:08 +0000
committerAndrey V. Elsukov <ae@FreeBSD.org>2014-11-10 10:59:08 +0000
commit45d1880a368b7481232c007349c4e6c159ecccab (patch)
tree8367444a28c26c5e4694fc9ac716b0dc23be76f1 /sys/netinet6/in6_src.c
parent7c644b84827336de1345c771773361a573758750 (diff)
downloadsrc-45d1880a368b7481232c007349c4e6c159ecccab.tar.gz
src-45d1880a368b7481232c007349c4e6c159ecccab.zip
For now handle only multicast addresses, we still use routes to
LLA unicasts yet. Sponsored by: Yandex LLC
Notes
Notes: svn path=/head/; revision=274342
Diffstat (limited to 'sys/netinet6/in6_src.c')
-rw-r--r--sys/netinet6/in6_src.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
index d721fb9cdd9a..227f234206a8 100644
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -587,10 +587,18 @@ selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
goto getroute;
}
/*
+ * If the destination address is a multicast address and the outgoing
+ * interface for the address is specified by the caller, use it.
+ */
+ if (IN6_IS_ADDR_MULTICAST(dst) &&
+ 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_SCOPE_LINKLOCAL(dst) ||
+ if (IN6_IS_ADDR_MC_LINKLOCAL(dst) ||
IN6_IS_ADDR_MC_NODELOCAL(dst)) {
zoneid = ntohs(in6_getscope(dst));
if (zoneid > 0) {
@@ -598,14 +606,6 @@ selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
goto done;
}
}
- /*
- * If the destination address is a multicast address and the outgoing
- * interface for the address is specified by the caller, use it.
- */
- if (IN6_IS_ADDR_MULTICAST(dst) &&
- mopts != NULL && (ifp = mopts->im6o_multicast_ifp) != NULL) {
- goto done; /* we do not need a route for multicast. */
- }
getroute:
/*