mirror of
https://github.com/nmap/nmap.git
synced 2025-12-26 17:39:03 +00:00
set the ip->ip_sum to 0 before computing the checksum of fragments. I'm not sure if this is necessary, but it is a useful sanity check at least.
This commit is contained in:
1
tcpip.cc
1
tcpip.cc
@@ -1332,6 +1332,7 @@ int send_frag_ip_packet(int sd, struct eth_nfo *eth, u8 *packet,
|
||||
if ((fragment-1) * mtu + fdatalen < datalen)
|
||||
ip->ip_off |= htons(IP_MF);
|
||||
#if HAVE_IP_IP_SUM
|
||||
ip->ip_sum = 0;
|
||||
ip->ip_sum = in_cksum((unsigned short *)ip, headerlen);
|
||||
#endif
|
||||
if (fragment > 1) // copy data payload
|
||||
|
||||
Reference in New Issue
Block a user