[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.93.2.5 and 1.93.2.6

version 1.93.2.5, 2001/02/11 19:17:14 version 1.93.2.6, 2001/03/12 13:31:50
Line 414  ip_input(struct mbuf *m)
Line 414  ip_input(struct mbuf *m)
          * not allowed.           * not allowed.
          */           */
         if (IN_MULTICAST(ip->ip_src.s_addr)) {          if (IN_MULTICAST(ip->ip_src.s_addr)) {
                 /* XXX stat */                  ipstat.ips_badaddr++;
                 goto bad;                  goto bad;
         }          }
   
           /* 127/8 must not appear on wire - RFC1122 */
           if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET ||
               (ntohl(ip->ip_src.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) {
                   if ((m->m_pkthdr.rcvif->if_flags & IFF_LOOPBACK) == 0) {
                           ipstat.ips_badaddr++;
                           goto bad;
                   }
           }
   
         if (in_cksum(m, hlen) != 0) {          if (in_cksum(m, hlen) != 0) {
                 ipstat.ips_badsum++;                  ipstat.ips_badsum++;
                 goto bad;                  goto bad;
Line 710  found:
Line 719  found:
                 IPQ_UNLOCK();                  IPQ_UNLOCK();
         }          }
   
   #ifdef IPSEC
           /*
            * enforce IPsec policy checking if we are seeing last header.
            * note that we do not visit this with protocols with pcb layer
            * code - like udp/tcp/raw ip.
            */
           if ((inetsw[ip_protox[ip->ip_p]].pr_flags & PR_LASTHDR) != 0 &&
               ipsec4_in_reject(m, NULL)) {
                   ipsecstat.in_polvio++;
                   goto bad;
           }
   #endif
   
         /*          /*
          * Switch out to protocol's input routine.           * Switch out to protocol's input routine.
          */           */

Legend:
Removed from v.1.93.2.5  
changed lines
  Added in v.1.93.2.6

CVSweb <webmaster@jp.NetBSD.org>