Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/netinet6 Pull up revision 1.14 (requested by itojun):



details:   https://anonhg.NetBSD.org/src/rev/a066f4e76eb5
branches:  netbsd-1-5
changeset: 489921:a066f4e76eb5
user:      he <he%NetBSD.org@localhost>
date:      Thu Oct 19 13:42:41 2000 +0000

description:
Pull up revision 1.14 (requested by itojun):
  KAME 1.32: discard PIM register with wrong version#.
  KAME 1.33: in add_m6fc(), always set interface list.

diffstat:

 sys/netinet6/ip6_mroute.c |  18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diffs (46 lines):

diff -r 5698d07a7eda -r a066f4e76eb5 sys/netinet6/ip6_mroute.c
--- a/sys/netinet6/ip6_mroute.c Thu Oct 19 13:38:13 2000 +0000
+++ b/sys/netinet6/ip6_mroute.c Thu Oct 19 13:42:41 2000 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: ip6_mroute.c,v 1.12.4.1 2000/08/29 15:04:13 itojun Exp $       */
-/*     $KAME: ip6_mroute.c,v 1.31 2000/08/23 03:20:05 itojun Exp $     */
+/*     $NetBSD: ip6_mroute.c,v 1.12.4.2 2000/10/19 13:42:41 he Exp $   */
+/*     $KAME: ip6_mroute.c,v 1.33 2000/10/19 02:23:43 jinmei Exp $     */
 
 /*
  * Copyright (C) 1998 WIDE Project.
@@ -770,6 +770,7 @@
                                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;
@@ -793,6 +794,7 @@
                        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;
@@ -1729,6 +1731,18 @@
                            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)) {



Home | Main Index | Thread Index | Old Index