[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.135 and 1.136

version 1.135, 2005/04/18 21:50:25 version 1.136, 2005/04/23 14:05:28
Line 1357  udp4_espinudp(m, off, src, so)
Line 1357  udp4_espinudp(m, off, src, so)
         size_t iphdrlen;          size_t iphdrlen;
         struct ip *ip;          struct ip *ip;
         struct mbuf *n;          struct mbuf *n;
           struct m_tag *tag;
           struct udphdr *udphdr;
           u_int16_t sport, dport;
   
         /*          /*
          * Collapse the mbuf chain if the first mbuf is too short           * Collapse the mbuf chain if the first mbuf is too short
Line 1407  udp4_espinudp(m, off, src, so)
Line 1410  udp4_espinudp(m, off, src, so)
         }          }
   
         /*          /*
            * Get the UDP ports. They are handled in network
            * order everywhere in IPSEC_NAT_T code.
            */
           udphdr = (struct udphdr *)(data - skip);
           sport = udphdr->uh_sport;
           dport = udphdr->uh_dport;
   
           /*
          * Remove the UDP header (and possibly the non ESP marker)           * Remove the UDP header (and possibly the non ESP marker)
          * IP header lendth is iphdrlen           * IP header lendth is iphdrlen
          * Before:           * Before:
Line 1439  udp4_espinudp(m, off, src, so)
Line 1450  udp4_espinudp(m, off, src, so)
                 return 0;                  return 0;
         }          }
   
           /*
            * Add a PACKET_TAG_IPSEC_NAT_T_PORT tag to remember
            * the source UDP port. This is required if we want
            * to select the right SPD for multiple hosts behind
            * same NAT
            */
           tag = m_tag_get(PACKET_TAG_IPSEC_NAT_T_PORTS,
               sizeof(sport) + sizeof(dport), M_WAITOK);
           ((u_int16_t *)(tag + 1))[0] = sport;
           ((u_int16_t *)(tag + 1))[1] = dport;
           m_tag_prepend(n, tag);
   
         esp4_input(n, iphdrlen);          esp4_input(n, iphdrlen);
   
         /* We handled it, it shoudln't be handled by UDP */          /* We handled it, it shoudln't be handled by UDP */

Legend:
Removed from v.1.135  
changed lines
  Added in v.1.136

CVSweb <webmaster@jp.NetBSD.org>