[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.73 and 1.77

version 1.73, 2000/12/04 11:23:04 version 1.77, 2001/05/31 19:56:13
Line 64 
Line 64 
  *      @(#)udp_usrreq.c        8.6 (Berkeley) 5/23/95   *      @(#)udp_usrreq.c        8.6 (Berkeley) 5/23/95
  */   */
   
   #include "opt_inet.h"
 #include "opt_ipsec.h"  #include "opt_ipsec.h"
 #include "opt_ipkdb.h"  #include "opt_ipkdb.h"
   
Line 110 
Line 111 
 #endif  #endif
 #endif  #endif
   
   #include "faith.h"
   #if defined(NFAITH) && NFAITH > 0
   #include <net/if_faith.h>
   #endif
   
 #include <machine/stdarg.h>  #include <machine/stdarg.h>
   
 #ifdef IPSEC  #ifdef IPSEC
Line 332  udp6_input(mp, offp, proto)
Line 338  udp6_input(mp, offp, proto)
         struct udphdr *uh;          struct udphdr *uh;
         u_int32_t plen, ulen;          u_int32_t plen, ulen;
   
   #ifndef PULLDOWN_TEST
           IP6_EXTHDR_CHECK(m, off, sizeof(struct udphdr), IPPROTO_DONE);
   #endif
           ip6 = mtod(m, struct ip6_hdr *);
   
 #if defined(NFAITH) && 0 < NFAITH  #if defined(NFAITH) && 0 < NFAITH
         if (m->m_pkthdr.rcvif) {          if (faithprefix(&ip6->ip6_dst)) {
                 if (m->m_pkthdr.rcvif->if_type == IFT_FAITH) {                  /* send icmp6 host unreach? */
                         /* send icmp6 host unreach? */                  m_freem(m);
                         m_freem(m);                  return IPPROTO_DONE;
                         return IPPROTO_DONE;  
                 }  
         }          }
 #endif  #endif
   
         udp6stat.udp6s_ipackets++;          udp6stat.udp6s_ipackets++;
   
 #ifndef PULLDOWN_TEST  
         IP6_EXTHDR_CHECK(m, off, sizeof(struct udphdr), IPPROTO_DONE);  
 #endif  
   
         ip6 = mtod(m, struct ip6_hdr *);  
         /* check for jumbogram is done in ip6_input.  we can trust pkthdr.len */          /* check for jumbogram is done in ip6_input.  we can trust pkthdr.len */
         plen = m->m_pkthdr.len - off;          plen = m->m_pkthdr.len - off;
 #ifndef PULLDOWN_TEST  #ifndef PULLDOWN_TEST
Line 704  udp6_realinput(af, src, dst, m, off)
Line 708  udp6_realinput(af, src, dst, m, off)
         u_int16_t *sport, *dport;          u_int16_t *sport, *dport;
         int rcvcnt;          int rcvcnt;
         struct in6_addr *src6, *dst6;          struct in6_addr *src6, *dst6;
         struct in_addr *src4;          struct in_addr *dst4;
         struct in6pcb *in6p;          struct in6pcb *in6p;
   
         rcvcnt = 0;          rcvcnt = 0;
Line 719  udp6_realinput(af, src, dst, m, off)
Line 723  udp6_realinput(af, src, dst, m, off)
         sport = &src->sin6_port;          sport = &src->sin6_port;
         dst6 = &dst->sin6_addr;          dst6 = &dst->sin6_addr;
         dport = &dst->sin6_port;          dport = &dst->sin6_port;
         src4 = (struct in_addr *)&src->sin6_addr.s6_addr32[12];          dst4 = (struct in_addr *)&dst->sin6_addr.s6_addr32[12];
   
         if (IN6_IS_ADDR_MULTICAST(dst6)          if (IN6_IS_ADDR_MULTICAST(dst6)
          || (af == AF_INET && IN_MULTICAST(dst4->s_addr))) {           || (af == AF_INET && IN_MULTICAST(dst4->s_addr))) {
Line 1256  udp_output(m, va_alist)
Line 1260  udp_output(m, va_alist)
         udpstat.udps_opackets++;          udpstat.udps_opackets++;
   
 #ifdef IPSEC  #ifdef IPSEC
         ipsec_setsocket(m, inp->inp_socket);          if (ipsec_setsocket(m, inp->inp_socket) != 0) {
                   error = ENOBUFS;
                   goto release;
           }
 #endif /*IPSEC*/  #endif /*IPSEC*/
   
         return (ip_output(m, inp->inp_options, &inp->inp_route,          return (ip_output(m, inp->inp_options, &inp->inp_route,

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.77

CVSweb <webmaster@jp.NetBSD.org>