[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.174 and 1.183

version 1.174, 2003/08/22 21:53:03 version 1.183, 2003/11/17 22:34:16
Line 219  extern struct domain inetdomain;
Line 219  extern struct domain inetdomain;
 int     ipqmaxlen = IFQ_MAXLEN;  int     ipqmaxlen = IFQ_MAXLEN;
 u_long  in_ifaddrhash;                          /* size of hash table - 1 */  u_long  in_ifaddrhash;                          /* size of hash table - 1 */
 int     in_ifaddrentries;                       /* total number of addrs */  int     in_ifaddrentries;                       /* total number of addrs */
 struct  in_ifaddrhead in_ifaddr;  struct in_ifaddrhead in_ifaddrhead;
 struct  in_ifaddrhashhead *in_ifaddrhashtbl;  struct  in_ifaddrhashhead *in_ifaddrhashtbl;
 u_long  in_multihash;                           /* size of hash table - 1 */  u_long  in_multihash;                           /* size of hash table - 1 */
 int     in_multientries;                        /* total number of addrs */  int     in_multientries;                        /* total number of addrs */
 struct  in_multihashhead *in_multihashtbl;  struct  in_multihashhead *in_multihashtbl;
 struct  ifqueue ipintrq;  struct  ifqueue ipintrq;
 struct  ipstat  ipstat;  struct  ipstat  ipstat;
 u_int16_t       ip_id;  uint16_t ip_id;
   
 #ifdef PFIL_HOOKS  #ifdef PFIL_HOOKS
 struct pfil_head inet_pfil_hook;  struct pfil_head inet_pfil_hook;
Line 360  ip_init()
Line 360  ip_init()
                     pr->pr_protocol && pr->pr_protocol != IPPROTO_RAW)                      pr->pr_protocol && pr->pr_protocol != IPPROTO_RAW)
                         ip_protox[pr->pr_protocol] = pr - inetsw;                          ip_protox[pr->pr_protocol] = pr - inetsw;
         LIST_INIT(&ipq);          LIST_INIT(&ipq);
         ip_id = time.tv_sec & 0xffff;          ip_id = time.tv_sec & 0xfffff;
         ipintrq.ifq_maxlen = ipqmaxlen;          ipintrq.ifq_maxlen = ipqmaxlen;
         TAILQ_INIT(&in_ifaddr);          TAILQ_INIT(&in_ifaddrhead);
         in_ifaddrhashtbl = hashinit(IN_IFADDR_HASH_SIZE, HASH_LIST, M_IFADDR,          in_ifaddrhashtbl = hashinit(IN_IFADDR_HASH_SIZE, HASH_LIST, M_IFADDR,
             M_WAITOK, &in_ifaddrhash);              M_WAITOK, &in_ifaddrhash);
         in_multihashtbl = hashinit(IN_IFADDR_HASH_SIZE, HASH_LIST, M_IPMADDR,          in_multihashtbl = hashinit(IN_IFADDR_HASH_SIZE, HASH_LIST, M_IPMADDR,
Line 445  ip_input(struct mbuf *m)
Line 445  ip_input(struct mbuf *m)
         if ((m->m_flags & M_PKTHDR) == 0)          if ((m->m_flags & M_PKTHDR) == 0)
                 panic("ipintr no HDR");                  panic("ipintr no HDR");
 #endif  #endif
 #ifdef IPSEC  
         /*  
          * should the inner packet be considered authentic?  
          * see comment in ah4_input().  
          */  
         if (m) {  
                 m->m_flags &= ~M_AUTHIPHDR;  
                 m->m_flags &= ~M_AUTHIPDGM;  
         }  
 #endif  
   
         /*          /*
          * If no IP addresses have been set yet but the interfaces           * If no IP addresses have been set yet but the interfaces
          * are receiving, can't do anything with incoming packets yet.           * are receiving, can't do anything with incoming packets yet.
          */           */
         if (TAILQ_FIRST(&in_ifaddr) == 0)          if (TAILQ_FIRST(&in_ifaddrhead) == 0)
                 goto bad;                  goto bad;
         ipstat.ips_total++;          ipstat.ips_total++;
         /*          /*
Line 1736  ip_forward(m, srcrt)
Line 1726  ip_forward(m, srcrt)
                 }                  }
         }          }
   
 #ifdef IPSEC  
         /* Don't lookup socket in forwarding case */  
         (void)ipsec_setsocket(m, NULL);  
 #endif  
         error = ip_output(m, (struct mbuf *)0, &ipforward_rt,          error = ip_output(m, (struct mbuf *)0, &ipforward_rt,
             (IP_FORWARDING | (ip_directedbcast ? IP_ALLOWBROADCAST : 0)),              (IP_FORWARDING | (ip_directedbcast ? IP_ALLOWBROADCAST : 0)),
             (struct ip_moptions *)NULL, (struct socket *)NULL);              (struct ip_moptions *)NULL, (struct socket *)NULL);
Line 1938  ip_sysctl(name, namelen, oldp, oldlenp, 
Line 1924  ip_sysctl(name, namelen, oldp, oldlenp, 
   
         int error, old;          int error, old;
   
         /* All sysctl names at this level are terminal. */          /* All sysctl names (except ifq.*) at this level are terminal. */
         if (namelen != 1)          if ((namelen != 1) && !(namelen == 2 && name[0] == IPCTL_IFQ))
                 return (ENOTDIR);                  return (ENOTDIR);
   
         switch (name[0]) {          switch (name[0]) {
         case IPCTL_FORWARDING:          case IPCTL_FORWARDING:
Line 2075  ip_sysctl(name, namelen, oldp, oldlenp, 
Line 2061  ip_sysctl(name, namelen, oldp, oldlenp, 
         case IPCTL_CHECKINTERFACE:          case IPCTL_CHECKINTERFACE:
                 return (sysctl_int(oldp, oldlenp, newp, newlen,                  return (sysctl_int(oldp, oldlenp, newp, newlen,
                     &ip_checkinterface));                      &ip_checkinterface));
   
           case IPCTL_IFQ:
                   return (sysctl_ifq(name + 1, namelen - 1, oldp, oldlenp,
                       newp, newlen, &ipintrq));
   
         default:          default:
                 return (EOPNOTSUPP);                  return (EOPNOTSUPP);
         }          }

Legend:
Removed from v.1.174  
changed lines
  Added in v.1.183

CVSweb <webmaster@jp.NetBSD.org>