[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.142 and 1.143

version 1.142, 2013/06/05 19:01:26 version 1.143, 2013/06/29 21:06:58
Line 68  __KERNEL_RCSID(0, "$NetBSD$");
Line 68  __KERNEL_RCSID(0, "$NetBSD$");
 #include "opt_inet.h"  #include "opt_inet.h"
 #include "opt_inet6.h"  #include "opt_inet6.h"
 #include "opt_ipsec.h"  #include "opt_ipsec.h"
 #include "opt_pfil_hooks.h"  
 #include "opt_compat_netbsd.h"  #include "opt_compat_netbsd.h"
   
 #include <sys/param.h>  #include <sys/param.h>
Line 92  __KERNEL_RCSID(0, "$NetBSD$");
Line 91  __KERNEL_RCSID(0, "$NetBSD$");
 #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>  #include <net/pfil.h>
 #endif  
   
 #include <netinet/in.h>  #include <netinet/in.h>
 #include <netinet/in_systm.h>  #include <netinet/in_systm.h>
Line 148  int ip6_forward_srcrt;   /* XXX */
Line 145  int ip6_forward_srcrt;   /* XXX */
 int ip6_sourcecheck;                    /* XXX */  int ip6_sourcecheck;                    /* XXX */
 int ip6_sourcecheck_interval;           /* XXX */  int ip6_sourcecheck_interval;           /* XXX */
   
 #ifdef PFIL_HOOKS  pfil_head_t *inet6_pfil_hook;
 struct pfil_head inet6_pfil_hook;  
 #endif  
   
 percpu_t *ip6stat_percpu;  percpu_t *ip6stat_percpu;
   
Line 194  ip6_init(void)
Line 189  ip6_init(void)
 #ifdef GATEWAY  #ifdef GATEWAY
         ip6flow_init(ip6_hashsize);          ip6flow_init(ip6_hashsize);
 #endif  #endif
   
 #ifdef PFIL_HOOKS  
         /* Register our Packet Filter hook. */          /* Register our Packet Filter hook. */
         inet6_pfil_hook.ph_type = PFIL_TYPE_AF;          inet6_pfil_hook = pfil_head_create(PFIL_TYPE_AF, (void *)AF_INET6);
         inet6_pfil_hook.ph_af   = AF_INET6;          KASSERT(inet6_pfil_hook != NULL);
         i = pfil_head_register(&inet6_pfil_hook);  
         if (i != 0)  
                 printf("ip6_init: WARNING: unable to register pfil hook, "  
                     "error %d\n", i);  
 #endif /* PFIL_HOOKS */  
   
         ip6stat_percpu = percpu_alloc(sizeof(uint64_t) * IP6_NSTATS);          ip6stat_percpu = percpu_alloc(sizeof(uint64_t) * IP6_NSTATS);
 }  }
Line 345  ip6_input(struct mbuf *m)
Line 333  ip6_input(struct mbuf *m)
          */           */
         m->m_flags |= M_CANFASTFWD;          m->m_flags |= M_CANFASTFWD;
   
 #ifdef PFIL_HOOKS  
         /*          /*
          * Run through list of hooks for input packets.  If there are any           * Run through list of hooks for input packets.  If there are any
          * filters which require that additional packets in the flow are           * filters which require that additional packets in the flow are
Line 366  ip6_input(struct mbuf *m)
Line 353  ip6_input(struct mbuf *m)
                 struct in6_addr odst;                  struct in6_addr odst;
   
                 odst = ip6->ip6_dst;                  odst = ip6->ip6_dst;
                 if (pfil_run_hooks(&inet6_pfil_hook, &m, m->m_pkthdr.rcvif,                  if (pfil_run_hooks(inet6_pfil_hook, &m, m->m_pkthdr.rcvif,
                                    PFIL_IN) != 0)                                     PFIL_IN) != 0)
                         return;                          return;
                 if (m == NULL)                  if (m == NULL)
Line 374  ip6_input(struct mbuf *m)
Line 361  ip6_input(struct mbuf *m)
                 ip6 = mtod(m, struct ip6_hdr *);                  ip6 = mtod(m, struct ip6_hdr *);
                 srcrt = !IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst);                  srcrt = !IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst);
         }          }
 #endif /* PFIL_HOOKS */  
   
         IP6_STATINC(IP6_STAT_NXTHIST + ip6->ip6_nxt);          IP6_STATINC(IP6_STAT_NXTHIST + ip6->ip6_nxt);
   

Legend:
Removed from v.1.142  
changed lines
  Added in v.1.143

CVSweb <webmaster@jp.NetBSD.org>