summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-10-19 03:14:03 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-10-19 03:14:03 +0000
commit35248170717727104d68cddb3edbb22ef37f8fcb (patch)
tree6df31ddb9ea79335e3ee87e6f03b6522b626fc6b
parent89d0d57d7a2e7178e33524872856262962860b25 (diff)
kame 1.31 -> 1.32
in add_m6fc(), set interface list for all cases. in response to a report from Hoerdt Mickael. kame 1.30 -> 1.31 discard PIM register if the version of the inner packet is incorrect (i.e. IPv6) (according to clarfication of recent discussion in the IETF pim ML)
-rw-r--r--sys/netinet6/ip6_mroute.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c
index db25d903a91..d53efd932d7 100644
--- a/sys/netinet6/ip6_mroute.c
+++ b/sys/netinet6/ip6_mroute.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: ip6_mroute.c,v 1.6 2000/08/29 09:20:24 itojun Exp $ */
-/* $KAME: ip6_mroute.c,v 1.31 2000/08/23 03:20:05 itojun Exp $ */
+/* $OpenBSD: ip6_mroute.c,v 1.7 2000/10/19 03:14:02 itojun Exp $ */
+/* $KAME: ip6_mroute.c,v 1.33 2000/10/19 02:23:43 jinmei Exp $ */
/*
* Copyright (C) 1998 WIDE Project.
@@ -772,6 +772,7 @@ add_m6fc(mfccp)
rt->mf6c_origin = mfccp->mf6cc_origin;
rt->mf6c_mcastgrp = mfccp->mf6cc_mcastgrp;
rt->mf6c_parent = mfccp->mf6cc_parent;
+ rt->mf6c_ifset = mfccp->mf6cc_ifset;
/* initialize pkt counters per src-grp */
rt->mf6c_pkt_cnt = 0;
rt->mf6c_byte_cnt = 0;
@@ -795,6 +796,7 @@ add_m6fc(mfccp)
rt->mf6c_origin = mfccp->mf6cc_origin;
rt->mf6c_mcastgrp = mfccp->mf6cc_mcastgrp;
rt->mf6c_parent = mfccp->mf6cc_parent;
+ rt->mf6c_ifset = mfccp->mf6cc_ifset;
/* initialize pkt counters per src-grp */
rt->mf6c_pkt_cnt = 0;
rt->mf6c_byte_cnt = 0;
@@ -1745,6 +1747,18 @@ pim6_input(mp, offp, proto)
ip6_sprintf(&eip6->ip6_dst),
ntohs(eip6->ip6_plen));
#endif
+
+ /* verify the version number of the inner packet */
+ if ((eip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) {
+ ++pim6stat.pim6s_rcv_badregisters;
+#ifdef MRT6DEBUG
+ log(LOG_DEBUG, "pim6_input: invalid IP version (%d) "
+ "of the inner packet\n",
+ (eip6->ip6_vfc & IPV6_VERSION));
+#endif
+ m_freem(m);
+ return(IPPROTO_NONE);
+ }
/* verify the inner packet is destined to a mcast group */
if (!IN6_IS_ADDR_MULTICAST(&eip6->ip6_dst)) {