diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-06-18 17:03:00 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-06-18 17:03:00 +0000 |
commit | ae10958087df9972a30642c71bf0fb61bf200563 (patch) | |
tree | 091755cc9d45d9e45b2d381f4fb86e5e96f1599e /sys/netinet6 | |
parent | 5f835d736286b65c382fb4e6c094c17c9ccd86bb (diff) |
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.
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6_src.c | 10 |
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); } } |