mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +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:
parent
116ba8fb91
commit
8964cb8773
1 changed files with 1 additions and 0 deletions
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue