[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.30.4.3 and 1.31

version 1.30.4.3, 1996/12/11 02:11:08 version 1.31, 1996/07/10 18:13:39
Line 345  ours:
Line 345  ours:
          * if the packet was previously fragmented,           * if the packet was previously fragmented,
          * but it's not worth the time; just let them time out.)           * but it's not worth the time; just let them time out.)
          */           */
         if (ip->ip_off & ~(IP_DF|IP_RF)) {          if (ip->ip_off &~ IP_DF) {
                 if (m->m_flags & M_EXT) {               /* XXX */                  if (m->m_flags & M_EXT) {               /* XXX */
                         if ((m = m_pullup(m, sizeof (struct ip))) == 0) {                          if ((m = m_pullup(m, sizeof (struct ip))) == 0) {
                                 ipstat.ips_toosmall++;                                  ipstat.ips_toosmall++;
Line 531  insert:
Line 531  insert:
                 return (0);                  return (0);
   
         /*          /*
          * Reassembly is complete.  Check for a bogus message size and           * Reassembly is complete; concatenate fragments.
          * concatenate fragments.  
          */           */
         q = fp->ipq_fragq.lh_first;          q = fp->ipq_fragq.lh_first;
         ip = q->ipqe_ip;          ip = q->ipqe_ip;
         if ((next + (ip->ip_hl << 2)) > IP_MAXPACKET) {  
                 ipstat.ips_toolong++;  
                 ip_freef(fp);  
                 return (0);  
         }  
         m = dtom(q->ipqe_ip);          m = dtom(q->ipqe_ip);
         t = m->m_next;          t = m->m_next;
         m->m_next = 0;          m->m_next = 0;
Line 920  ip_srcroute()
Line 914  ip_srcroute()
         *(mtod(m, struct in_addr *)) = *p--;          *(mtod(m, struct in_addr *)) = *p--;
 #ifdef DIAGNOSTIC  #ifdef DIAGNOSTIC
         if (ipprintfs)          if (ipprintfs)
                 printf(" hops %x", ntohl(mtod(m, struct in_addr *)->s_addr));                  printf(" hops %lx", ntohl(mtod(m, struct in_addr *)->s_addr));
 #endif  #endif
   
         /*          /*
Line 940  ip_srcroute()
Line 934  ip_srcroute()
         while (p >= ip_srcrt.route) {          while (p >= ip_srcrt.route) {
 #ifdef DIAGNOSTIC  #ifdef DIAGNOSTIC
                 if (ipprintfs)                  if (ipprintfs)
                         printf(" %x", ntohl(q->s_addr));                          printf(" %lx", ntohl(q->s_addr));
 #endif  #endif
                 *q++ = *p--;                  *q++ = *p--;
         }          }
Line 950  ip_srcroute()
Line 944  ip_srcroute()
         *q = ip_srcrt.dst;          *q = ip_srcrt.dst;
 #ifdef DIAGNOSTIC  #ifdef DIAGNOSTIC
         if (ipprintfs)          if (ipprintfs)
                 printf(" %x\n", ntohl(q->s_addr));                  printf(" %lx\n", ntohl(q->s_addr));
 #endif  #endif
         return (m);          return (m);
 }  }
Line 1056  ip_forward(m, srcrt)
Line 1050  ip_forward(m, srcrt)
         }          }
   
         /*          /*
          * Save at most 68 bytes of the packet in case           * Save at most 64 bytes of the packet in case
          * we need to generate an ICMP message to the src.           * we need to generate an ICMP message to the src.
          */           */
         mcopy = m_copy(m, 0, imin((int)ip->ip_len, 68));          mcopy = m_copy(m, 0, imin((int)ip->ip_len, 64));
   
         /*          /*
          * If forwarding packet using same interface that it came in on,           * If forwarding packet using same interface that it came in on,

Legend:
Removed from v.1.30.4.3  
changed lines
  Added in v.1.31

CVSweb <webmaster@jp.NetBSD.org>