summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritojun <itojun@openbsd.org>2000-06-18 17:02:59 +0000
committeritojun <itojun@openbsd.org>2000-06-18 17:02:59 +0000
commitff235b701281c9468a741454e2999fcb936f9565 (patch)
tree8733dd0c7bf36ab17c2977209e676a4306c20439
parentsync (diff)
downloadwireguard-openbsd-ff235b701281c9468a741454e2999fcb936f9565.tar.xz
wireguard-openbsd-ff235b701281c9468a741454e2999fcb936f9565.zip
lookup routing table for multicast too, to allow scoped IPv6 multicast
to go out of the node. "ping6 ff02::1%wi0" will work fine with this (and should correct route6d behavior too) this is major issue for IPv6. i think this needs to become an erratta entry. sorry about this.
-rw-r--r--sys/netinet6/in6_src.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
index 15909d873f6..0f8970112c7 100644
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: in6_src.c,v 1.6 2000/06/18 04:49:32 itojun Exp $ */
-/* $KAME: in6_src.c,v 1.23 2000/06/12 08:15:27 itojun Exp $ */
+/* $OpenBSD: in6_src.c,v 1.7 2000/06/18 17:02:59 itojun Exp $ */
+/* $KAME: in6_src.c,v 1.26 2000/06/18 06:31:40 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -244,7 +244,11 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp)
ro->ro_dst.sin6_family = AF_INET6;
ro->ro_dst.sin6_len = sizeof(struct sockaddr_in6);
ro->ro_dst.sin6_addr = *dst;
- if (!IN6_IS_ADDR_MULTICAST(dst)) {
+ ro->ro_dst.sin6_scope_id = dstsock->sin6_scope_id;
+ if (IN6_IS_ADDR_MULTICAST(dst)) {
+ ro->ro_rt = rtalloc1(&((struct route *)ro)
+ ->ro_dst, 0);
+ } else {
rtalloc((struct route *)ro);
}
}