VirtualBox

Changeset 27467 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 18, 2010 7:10:10 AM (15 years ago)
Author:
vboxsync
Message:

NAT: comment to ICMP find routine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/ip_icmp.c

    r27448 r27467  
    188188                }
    189189                icp0 = (struct icmp *)((char *)ip0 + (ip0->ip_hl << 2));
     190                /*
     191                 * IP could pointer to ICMP_REPLY datagram (1)
     192                 * or pointer IP header in ICMP payload in case of
     193                 * ICMP_TIMXCEED or ICMP_UNREACH (2)
     194                 *
     195                 * if (1) and then ICMP (type should be ICMP_ECHOREPLY) and we need check that
     196                 * IP.IP_SRC == IP0.IP_DST received datagramm comes from destination.
     197                 *
     198                 * if (2) then check that payload ICMP has got type ICMP_ECHO and
     199                 * IP.IP_DST == IP0.IP_DST destination of returned datagram is the same as
     200                 * one was sent.
     201                 */
    190202                if (  (   (icp->icmp_type != ICMP_ECHO && ip->ip_src.s_addr == ip0->ip_dst.s_addr)
    191203                       || (icp->icmp_type == ICMP_ECHO && ip->ip_dst.s_addr == ip0->ip_dst.s_addr))
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette