VirtualBox

Ignore:
Timestamp:
Nov 11, 2014 2:19:29 PM (10 years ago)
Author:
vboxsync
Message:

NAT: set icmp type (to echo reply) using mbuf api when we reply to
pings directed to slirp itself.

This fixes replies to fragmented requests for which we used to update
a contiguous copy instead of the original mbuf and so we ended up
replying back with echo requests.

File:
1 edited

Legend:

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

    r53298 r53303  
    412412                || CTL_CHECK(dst, CTL_TFTP))
    413413            {
    414                 icp->icmp_type = ICMP_ECHOREPLY;
     414                uint8_t echo_reply = ICMP_ECHOREPLY;
     415                m_copyback(pData, m, hlen + RT_OFFSETOF(struct icmp, icmp_type),
     416                           sizeof(echo_reply), (caddr_t)&echo_reply);
    415417                ip->ip_dst.s_addr = ip->ip_src.s_addr;
    416418                ip->ip_src.s_addr = dst;
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