VirtualBox

Changeset 49863 in vbox


Ignore:
Timestamp:
Dec 10, 2013 5:10:34 AM (11 years ago)
Author:
vboxsync
Message:

pxping_recv4: according to ping sources at www.opensource.apple.com
and contrary to icmp(4) man page, when sending with IP_HDRINCL the IP
header checksum must be set, and set to the host-order checksum of the
whole IP datagram including payload.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/NAT/pxping.c

    r49862 r49863  
    530530        IPH_OFFSET_SET(iph, ntohs(IPH_OFFSET(iph)));
    531531        IPH_LEN_SET(iph, ntohs(IPH_LEN(iph)));
    532 #endif
     532        /* wants checksum */
     533        sum = inet_chksum_pbuf(p); /* sic(?) */
     534        IPH_CHKSUM_SET(iph, sum);
     535#else /* !RT_OS_DARWIN  */
    533536        IPH_CHKSUM_SET(iph, 0); /* kernel will recalculate */
     537#endif
    534538    }
    535539    else /* !pxping->hdrincl */
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