[BACK]Return to udp_usrreq.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/udp_usrreq.c between version 1.103 and 1.106

version 1.103, 2003/06/29 22:32:01 version 1.106, 2003/08/21 14:49:50
Line 41 
Line 41 
  * 2. Redistributions in binary form must reproduce the above copyright   * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the   *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.   *    documentation and/or other materials provided with the distribution.
  * 3. All advertising materials mentioning features or use of this software   * 3. Neither the name of the University nor the names of its contributors
  *    must display the following acknowledgement:  
  *      This product includes software developed by the University of  
  *      California, Berkeley and its contributors.  
  * 4. Neither the name of the University nor the names of its contributors  
  *    may be used to endorse or promote products derived from this software   *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.   *    without specific prior written permission.
  *   *
Line 119  __KERNEL_RCSID(0, "$NetBSD$");
Line 115  __KERNEL_RCSID(0, "$NetBSD$");
   
 #include <machine/stdarg.h>  #include <machine/stdarg.h>
   
   #ifdef FAST_IPSEC
   #include <netipsec/ipsec.h>
   #ifdef INET6
   #include <netipsec/ipsec6.h>
   #endif
   #endif  /* FAST_IPSEC*/
   
 #ifdef IPSEC  #ifdef IPSEC
 #include <netinet6/ipsec.h>  #include <netinet6/ipsec.h>
 #include <netkey/key.h>  #include <netkey/key.h>
Line 275  udp_input(m, va_alist)
Line 278  udp_input(m, va_alist)
                         UDP_CSUM_COUNTER_INCR(&udp_hwcsum_bad);                          UDP_CSUM_COUNTER_INCR(&udp_hwcsum_bad);
                         goto badcsum;                          goto badcsum;
   
                 case M_CSUM_UDPv4|M_CSUM_DATA:                  case M_CSUM_UDPv4|M_CSUM_DATA: {
                           u_int32_t hw_csum = m->m_pkthdr.csum_data;
                         UDP_CSUM_COUNTER_INCR(&udp_hwcsum_data);                          UDP_CSUM_COUNTER_INCR(&udp_hwcsum_data);
                         if ((m->m_pkthdr.csum_data ^ 0xffff) != 0)                          if (m->m_pkthdr.csum_flags & M_CSUM_NO_PSEUDOHDR)
                             hw_csum = in_cksum_phdr(ip->ip_src.s_addr, ip->ip_dst.s_addr,
                                   htonl(hw_csum + ntohs(ip->ip_len) + IPPROTO_UDP));
                           if ((hw_csum ^ 0xffff) != 0)
                                 goto badcsum;                                  goto badcsum;
                         break;                          break;
                   }
   
                 case M_CSUM_UDPv4:                  case M_CSUM_UDPv4:
                         /* Checksum was okay. */                          /* Checksum was okay. */
Line 490  udp4_sendup(m, off, src, so)
Line 498  udp4_sendup(m, off, src, so)
                 return;                  return;
         }          }
   
 #ifdef IPSEC  #if defined(IPSEC) || defined(FAST_IPSEC)
         /* check AH/ESP integrity. */          /* check AH/ESP integrity. */
         if (so != NULL && ipsec4_in_reject_so(m, so)) {          if (so != NULL && ipsec4_in_reject_so(m, so)) {
                 ipsecstat.in_polvio++;                  ipsecstat.in_polvio++;
Line 536  udp6_sendup(m, off, src, so)
Line 544  udp6_sendup(m, off, src, so)
                 return;                  return;
         in6p = sotoin6pcb(so);          in6p = sotoin6pcb(so);
   
 #ifdef IPSEC  #if defined(IPSEC) || defined(FAST_IPSEC)
         /* check AH/ESP integrity. */          /* check AH/ESP integrity. */
         if (so != NULL && ipsec6_in_reject_so(m, so)) {          if (so != NULL && ipsec6_in_reject_so(m, so)) {
                 ipsec6stat.in_polvio++;                  ipsec6stat.in_polvio++;
Line 907  udp_output(m, va_alist)
Line 915  udp_output(m, va_alist)
   
         return (ip_output(m, inp->inp_options, &inp->inp_route,          return (ip_output(m, inp->inp_options, &inp->inp_route,
             inp->inp_socket->so_options & (SO_DONTROUTE | SO_BROADCAST),              inp->inp_socket->so_options & (SO_DONTROUTE | SO_BROADCAST),
             inp->inp_moptions));              inp->inp_moptions, inp));
   
 release:  release:
         m_freem(m);          m_freem(m);

Legend:
Removed from v.1.103  
changed lines
  Added in v.1.106

CVSweb <webmaster@jp.NetBSD.org>