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

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

Diff for /src/sys/netinet/ip_input.c between version 1.35 and 1.36

version 1.35, 1996/09/09 14:51:16 version 1.36, 1996/09/14 14:40:26
Line 61 
Line 61 
 #include <netinet/ip_var.h>  #include <netinet/ip_var.h>
 #include <netinet/ip_icmp.h>  #include <netinet/ip_icmp.h>
   
   #ifdef PFIL_HOOKS
   #include <net/pfil.h>
   #endif /* PFIL_HOOKS */
   
 #ifndef IPFORWARDING  #ifndef IPFORWARDING
 #ifdef GATEWAY  #ifdef GATEWAY
 #define IPFORWARDING    1       /* forward IP packets not for us */  #define IPFORWARDING    1       /* forward IP packets not for us */
Line 160  ipintr()
Line 164  ipintr()
         register struct in_ifaddr *ia;          register struct in_ifaddr *ia;
         struct ipqent *ipqe;          struct ipqent *ipqe;
         int hlen = 0, mff, len, s;          int hlen = 0, mff, len, s;
 #ifdef PACKET_FILTER  #ifdef PFIL_HOOKS
         struct packet_filter_hook *pfh;          struct packet_filter_hook *pfh;
         struct mbuf *m0;          struct mbuf *m0;
 #endif /* PACKET_FILTER */  #endif /* PFIL_HOOKS */
   
 next:  next:
         /*          /*
Line 239  next:
Line 243  next:
                         m_adj(m, len - m->m_pkthdr.len);                          m_adj(m, len - m->m_pkthdr.len);
         }          }
   
 #ifdef PACKET_FILTER  #ifdef PFIL_HOOKS
         /*          /*
          * Run through list of hooks for input packets.           * Run through list of hooks for input packets.
          */           */
Line 250  next:
Line 254  next:
                                 goto bad;                                  goto bad;
                         ip = mtod(m = m0, struct ip *);                          ip = mtod(m = m0, struct ip *);
                 }                  }
 #endif /* PACKET_FILTER */  #endif /* PFIL_HOOKS */
   
         /*          /*
          * Process options and, if not destined for us,           * Process options and, if not destined for us,
Line 433  found:
Line 437  found:
         (*inetsw[ip_protox[ip->ip_p]].pr_input)(m, hlen);          (*inetsw[ip_protox[ip->ip_p]].pr_input)(m, hlen);
         goto next;          goto next;
 bad:  bad:
 #ifdef PACKET_FILTER  #ifdef PFIL_HOOKS
         m0 = m;          m0 = m;
         for (pfh = pfil_hook_get(PFIL_BAD); pfh; pfh = pfh->pfil_link.le_next)          for (pfh = pfil_hook_get(PFIL_BAD); pfh; pfh = pfh->pfil_link.le_next)
                 if (pfh->pfil_func) {                  if (pfh->pfil_func) {
                         (void)pfh->pfil_func(ip, hlen, m->m_pkthdr.rcvif, 2, &m0);                          (void)pfh->pfil_func(ip, hlen, m->m_pkthdr.rcvif, 2, &m0);
                         ip = mtod(m = m0, struct ip *);                          ip = mtod(m = m0, struct ip *);
                 }                  }
 #endif /* PACKET_FILTER */  #endif /* PFIL_HOOKS */
         m_freem(m);          m_freem(m);
         goto next;          goto next;
 }  }

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

CVSweb <webmaster@jp.NetBSD.org>