[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.275 and 1.275.2.1

version 1.275, 2008/10/04 00:09:34 version 1.275.2.1, 2009/01/19 13:20:13
Line 94 
Line 94 
 __KERNEL_RCSID(0, "$NetBSD$");  __KERNEL_RCSID(0, "$NetBSD$");
   
 #include "opt_inet.h"  #include "opt_inet.h"
   #include "opt_compat_netbsd.h"
 #include "opt_gateway.h"  #include "opt_gateway.h"
 #include "opt_pfil_hooks.h"  #include "opt_pfil_hooks.h"
 #include "opt_ipsec.h"  #include "opt_ipsec.h"
Line 173  __KERNEL_RCSID(0, "$NetBSD$");
Line 174  __KERNEL_RCSID(0, "$NetBSD$");
 #define IPMTUDISCTIMEOUT (10 * 60)      /* as per RFC 1191 */  #define IPMTUDISCTIMEOUT (10 * 60)      /* as per RFC 1191 */
 #endif  #endif
   
   #ifdef COMPAT_50
   #include <compat/sys/time.h>
   #include <compat/sys/socket.h>
   #endif
   
 /*  /*
  * Note: DIRECTED_BROADCAST is handled this way so that previous   * Note: DIRECTED_BROADCAST is handled this way so that previous
  * configuration using this option will Just Work.   * configuration using this option will Just Work.
Line 931  ours:
Line 937  ours:
                                  */                                   */
                                 if (ip->ip_tos != fp->ipq_tos) {                                  if (ip->ip_tos != fp->ipq_tos) {
                                         IP_STATINC(IP_STAT_BADFRAGS);                                          IP_STATINC(IP_STAT_BADFRAGS);
                                           IPQ_UNLOCK();
                                         goto bad;                                          goto bad;
                                 }                                  }
                                 goto found;                                  goto found;
Line 1121  ip_reass(struct ipqent *ipqe, struct ipq
Line 1128  ip_reass(struct ipqent *ipqe, struct ipq
                 else if (ip_nfragpackets >= ip_maxfragpackets)                  else if (ip_nfragpackets >= ip_maxfragpackets)
                         goto dropfrag;                          goto dropfrag;
                 ip_nfragpackets++;                  ip_nfragpackets++;
                 MALLOC(fp, struct ipq *, sizeof (struct ipq),                  fp = malloc(sizeof (struct ipq), M_FTABLE, M_NOWAIT);
                     M_FTABLE, M_NOWAIT);  
                 if (fp == NULL)                  if (fp == NULL)
                         goto dropfrag;                          goto dropfrag;
                 LIST_INSERT_HEAD(ipqhead, fp, ipq_q);                  LIST_INSERT_HEAD(ipqhead, fp, ipq_q);
Line 1253  insert:
Line 1259  insert:
         ip->ip_src = fp->ipq_src;          ip->ip_src = fp->ipq_src;
         ip->ip_dst = fp->ipq_dst;          ip->ip_dst = fp->ipq_dst;
         LIST_REMOVE(fp, ipq_q);          LIST_REMOVE(fp, ipq_q);
         FREE(fp, M_FTABLE);          free(fp, M_FTABLE);
         ip_nfragpackets--;          ip_nfragpackets--;
         m->m_len += (ip->ip_hl << 2);          m->m_len += (ip->ip_hl << 2);
         m->m_data -= (ip->ip_hl << 2);          m->m_data -= (ip->ip_hl << 2);
Line 1306  ip_freef(struct ipq *fp)
Line 1312  ip_freef(struct ipq *fp)
             printf("ip_freef: nfrags %d != %d\n", fp->ipq_nfrags, nfrags);              printf("ip_freef: nfrags %d != %d\n", fp->ipq_nfrags, nfrags);
         ip_nfrags -= nfrags;          ip_nfrags -= nfrags;
         LIST_REMOVE(fp, ipq_q);          LIST_REMOVE(fp, ipq_q);
         FREE(fp, M_FTABLE);          free(fp, M_FTABLE);
         ip_nfragpackets--;          ip_nfragpackets--;
 }  }
   
Line 2051  ip_savecontrol(struct inpcb *inp, struct
Line 2057  ip_savecontrol(struct inpcb *inp, struct
     struct mbuf *m)      struct mbuf *m)
 {  {
   
         if (inp->inp_socket->so_options & SO_TIMESTAMP) {          if (inp->inp_socket->so_options & SO_TIMESTAMP
   #ifdef SO_OTIMESTAMP
               || inp->inp_socket->so_options & SO_OTIMESTAMP
   #endif
               ) {
                 struct timeval tv;                  struct timeval tv;
   
                 microtime(&tv);                  microtime(&tv);
   #ifdef SO_OTIMESTAMP
                   if (inp->inp_socket->so_options & SO_OTIMESTAMP) {
                           struct timeval50 tv50;
                           timeval_to_timeval50(&tv, &tv50);
                           *mp = sbcreatecontrol((void *) &tv50, sizeof(tv50),
                               SCM_OTIMESTAMP, SOL_SOCKET);
                   } else
   #endif
                 *mp = sbcreatecontrol((void *) &tv, sizeof(tv),                  *mp = sbcreatecontrol((void *) &tv, sizeof(tv),
                     SCM_TIMESTAMP, SOL_SOCKET);                      SCM_TIMESTAMP, SOL_SOCKET);
                 if (*mp)                  if (*mp)

Legend:
Removed from v.1.275  
changed lines
  Added in v.1.275.2.1

CVSweb <webmaster@jp.NetBSD.org>