[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.135.2.2 and 1.135.2.3

version 1.135.2.2, 2002/01/10 20:02:50 version 1.135.2.3, 2002/03/16 16:02:12
Line 139  __KERNEL_RCSID(0, "$NetBSD$");
Line 139  __KERNEL_RCSID(0, "$NetBSD$");
 /* just for gif_ttl */  /* just for gif_ttl */
 #include <netinet/in_gif.h>  #include <netinet/in_gif.h>
 #include "gif.h"  #include "gif.h"
   #include <net/if_gre.h>
   #include "gre.h"
   
 #ifdef MROUTING  #ifdef MROUTING
 #include <netinet/ip_mroute.h>  #include <netinet/ip_mroute.h>
Line 316  ip_init()
Line 318  ip_init()
         int i;          int i;
   
         pool_init(&ipqent_pool, sizeof(struct ipqent), 0, 0, 0, "ipqepl",          pool_init(&ipqent_pool, sizeof(struct ipqent), 0, 0, 0, "ipqepl",
             0, NULL, NULL, M_IPQ);              NULL);
   
         pr = pffindproto(PF_INET, IPPROTO_RAW, SOCK_RAW);          pr = pffindproto(PF_INET, IPPROTO_RAW, SOCK_RAW);
         if (pr == 0)          if (pr == 0)
Line 685  ip_input(struct mbuf *m)
Line 687  ip_input(struct mbuf *m)
                         ipstat.ips_cantforward++;                          ipstat.ips_cantforward++;
                         return;                          return;
                 }                  }
   #ifdef IPSEC
                   if (ipsec4_in_reject(m, NULL)) {
                           ipsecstat.in_polvio++;
                           goto bad;
                   }
   #endif
   
                 ip_forward(m, 0);                  ip_forward(m, 0);
         }          }
         return;          return;
Line 1665  ip_forward(m, srcrt)
Line 1674  ip_forward(m, srcrt)
                 break;                  break;
   
         case ENOBUFS:          case ENOBUFS:
   #if 1
                   /*
                    * a router should not generate ICMP_SOURCEQUENCH as
                    * required in RFC1812 Requirements for IP Version 4 Routers.
                    * source quench could be a big problem under DoS attacks,
                    * or the underlying interface is rate-limited.
                    */
                   if (mcopy)
                           m_freem(mcopy);
                   return;
   #else
                 type = ICMP_SOURCEQUENCH;                  type = ICMP_SOURCEQUENCH;
                 code = 0;                  code = 0;
                 break;                  break;
   #endif
         }          }
         icmp_error(mcopy, type, code, dest, destifp);          icmp_error(mcopy, type, code, dest, destifp);
 }  }
Line 1844  ip_sysctl(name, namelen, oldp, oldlenp, 
Line 1865  ip_sysctl(name, namelen, oldp, oldlenp, 
                                   &ip_gif_ttl));                                    &ip_gif_ttl));
 #endif  #endif
   
   #if NGRE > 0
           case IPCTL_GRE_TTL:
                   return(sysctl_int(oldp, oldlenp, newp, newlen,
                                     &ip_gre_ttl));
   #endif
   
 #ifndef IPNOPRIVPORTS  #ifndef IPNOPRIVPORTS
         case IPCTL_LOWPORTMIN:          case IPCTL_LOWPORTMIN:
                 old = lowportmin;                  old = lowportmin;

Legend:
Removed from v.1.135.2.2  
changed lines
  Added in v.1.135.2.3

CVSweb <webmaster@jp.NetBSD.org>