VirtualBox

Changeset 56957 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jul 16, 2015 4:43:20 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
101667
Message:

NAT: undo byte order conversions on the saved IP header when relaying
back an ICMP error.

File:
1 edited

Legend:

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

    r56377 r56957  
    12871287        /* according RFC 793 error messages required copy of initial IP header + 64 bit */
    12881288        memcpy(&icp->icmp_ip, ip_copy, old_ip_len);
     1289
     1290        /* undo byte order conversions done in ip_input() */
     1291        HTONS(icp->icmp_ip.ip_len);
     1292        HTONS(icp->icmp_ip.ip_id);
     1293        HTONS(icp->icmp_ip.ip_off);
     1294
    12891295        ip->ip_tos = ((ip->ip_tos & 0x1E) | 0xC0);  /* high priority for errors */
    12901296    }
Note: See TracChangeset for help on using the changeset viewer.

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