[BACK]Return to ip6_input.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / netinet6

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/netinet6/ip6_input.c between version 1.13 and 1.17

version 1.13, 2000/01/31 10:33:22 version 1.17, 2000/03/21 11:05:12
Line 1 
Line 1 
 /*      $NetBSD$        */  /*      $NetBSD$        */
   /*      $KAME: ip6_input.c,v 1.72 2000/03/21 09:23:19 itojun Exp $      */
   
 /*  /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.   * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
Line 66 
Line 67 
   
 #include "opt_inet.h"  #include "opt_inet.h"
 #include "opt_ipsec.h"  #include "opt_ipsec.h"
   #include "opt_pfil_hooks.h"
   
 #include <sys/param.h>  #include <sys/param.h>
 #include <sys/systm.h>  #include <sys/systm.h>
Line 86 
Line 88 
 #include <net/if_dl.h>  #include <net/if_dl.h>
 #include <net/route.h>  #include <net/route.h>
 #include <net/netisr.h>  #include <net/netisr.h>
   #ifdef PFIL_HOOKS
   #include <net/pfil.h>
   #endif
   
 #include <netinet/in.h>  #include <netinet/in.h>
 #include <netinet/in_systm.h>  #include <netinet/in_systm.h>
Line 93 
Line 98 
 #include <netinet/ip.h>  #include <netinet/ip.h>
 #include <netinet/ip_icmp.h>  #include <netinet/ip_icmp.h>
 #endif /*INET*/  #endif /*INET*/
 #include <netinet6/ip6.h>  #include <netinet/ip6.h>
 #include <netinet6/in6_var.h>  #include <netinet6/in6_var.h>
 #include <netinet6/ip6_var.h>  #include <netinet6/ip6_var.h>
 #include <netinet6/in6_pcb.h>  #include <netinet6/in6_pcb.h>
 #include <netinet6/icmp6.h>  #include <netinet/icmp6.h>
 #include <netinet6/in6_ifattach.h>  #include <netinet6/in6_ifattach.h>
 #include <netinet6/nd6.h>  #include <netinet6/nd6.h>
 #include <netinet6/in6_prefix.h>  #include <netinet6/in6_prefix.h>
Line 118 
Line 123 
 #include <net/net_osdep.h>  #include <net/net_osdep.h>
   
 extern struct domain inet6domain;  extern struct domain inet6domain;
 extern struct ip6protosw inet6sw[];  
   
 u_char ip6_protox[IPPROTO_MAX];  u_char ip6_protox[IPPROTO_MAX];
 static int ip6qmaxlen = IFQ_MAXLEN;  static int ip6qmaxlen = IFQ_MAXLEN;
Line 238  ip6_input(m)
Line 242  ip6_input(m)
         u_int32_t rtalert = ~0;          u_int32_t rtalert = ~0;
         int nxt, ours = 0;          int nxt, ours = 0;
         struct ifnet *deliverifp = NULL;          struct ifnet *deliverifp = NULL;
   #ifdef  PFIL_HOOKS
           struct packet_filter_hook *pfh;
           struct mbuf *m0;
           int rv;
   #endif  /* PFIL_HOOKS */
   
 #ifdef IPSEC  #ifdef IPSEC
         /*          /*
Line 297  ip6_input(m)
Line 306  ip6_input(m)
                 goto bad;                  goto bad;
         }          }
   
   #ifdef PFIL_HOOKS
           /*
            * Run through list of hooks for input packets.  If there are any
            * filters which require that additional packets in the flow are
            * not fast-forwarded, they must clear the M_CANFASTFWD flag.
            * Note that filters must _never_ set this flag, as another filter
            * in the list may have previously cleared it.
            */
           m0 = m;
           pfh = pfil_hook_get(PFIL_IN, &inetsw[ip_protox[IPPROTO_IPV6]].pr_pfh);
           for (; pfh; pfh = pfh->pfil_link.tqe_next)
                   if (pfh->pfil_func) {
                           rv = pfh->pfil_func(ip6, sizeof(*ip6),
                                               m->m_pkthdr.rcvif, 0, &m0);
                           if (rv)
                                   return;
                           m = m0;
                           if (m == NULL)
                                   return;
                           ip6 = mtod(m, struct ip6_hdr *);
                   }
   #endif /* PFIL_HOOKS */
   
   
         ip6stat.ip6s_nxthist[ip6->ip6_nxt]++;          ip6stat.ip6s_nxthist[ip6->ip6_nxt]++;
   
 #ifdef IPV6FIREWALL  #ifdef IPV6FIREWALL
Line 337  ip6_input(m)
Line 370  ip6_input(m)
                 in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_addrerr);                  in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_addrerr);
                 goto bad;                  goto bad;
         }          }
 #if 1  #if 0
         /*          /*
          * We don't support it, so it is strange to get this.           * Reject packets with IPv4 compatible addresses (auto tunnel).
            *
            * The code forbids auto tunnel relay case in RFC1933 (the check is
            * stronger than RFC1933).  We may want to re-enable it if mech-xx
            * is revised to forbid relaying case.
          */           */
         if (IN6_IS_ADDR_V4COMPAT(&ip6->ip6_src) ||          if (IN6_IS_ADDR_V4COMPAT(&ip6->ip6_src) ||
             IN6_IS_ADDR_V4COMPAT(&ip6->ip6_dst)) {              IN6_IS_ADDR_V4COMPAT(&ip6->ip6_dst)) {

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.17

CVSweb <webmaster@jp.NetBSD.org>