From ae10958087df9972a30642c71bf0fb61bf200563 Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Sun, 18 Jun 2000 17:03:00 +0000 Subject: 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. --- sys/netinet6/in6_src.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sys/netinet6') 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); } } -- cgit v1.2.3