mirror of
https://github.com/nmap/nmap.git
synced 2026-10-21 19:32:18 +00:00
Add a comment explaining why we can unconditionally set the id and seq
fields in build_icmp_raw, even though not all ICMP types have them. All the types handled by the function do have them, and in the same place.
This commit is contained in:
parent
c1daed771c
commit
bc55d41b9a
1 changed files with 2 additions and 1 deletions
3
tcpip.cc
3
tcpip.cc
|
|
@ -635,7 +635,8 @@ u8 *build_icmp_raw(const struct in_addr *source,
|
|||
memset(datastart, 0, MIN(dlen, datalen));
|
||||
}
|
||||
|
||||
/* Fill out the ping packet */
|
||||
/* Fill out the ping packet. All the ICMP types handled by this function have
|
||||
the id and seq fields. */
|
||||
pingpkt.id = htons(id);
|
||||
pingpkt.seq = htons(seq);
|
||||
pingpkt.checksum = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue