VirtualBox

Changeset 56960 in vbox for trunk


Ignore:
Timestamp:
Jul 16, 2015 11:30:18 PM (9 years ago)
Author:
vboxsync
Message:

NAT: adjust IP checksum after decrementing TTL so that if we use this
IP header in a future ICMP error the checksum is correct.

File:
1 edited

Legend:

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

    r56292 r56960  
    194194
    195195    ip->ip_ttl--;
     196    if (ip->ip_sum > RT_H2N_U16_C(0xffffU - (1 << 8)))
     197        ip->ip_sum += RT_H2N_U16_C(1 << 8) + 1;
     198    else
     199        ip->ip_sum += RT_H2N_U16_C(1 << 8);
    196200
    197201    /*
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