mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 20:51:30 +00:00
Print IP addresses in ippackethdrinfo() in tcpip.cc when there's an unknown protocol (like with -sO)
This commit is contained in:
4
tcpip.cc
4
tcpip.cc
@@ -636,8 +636,8 @@ static const char *ippackethdrinfo(const u8 *packet, u32 len) {
|
|||||||
snprintf(protoinfo, sizeof(protoinfo), "ICMP %s > %s %s (type=%d/code=%d) %s",
|
snprintf(protoinfo, sizeof(protoinfo), "ICMP %s > %s %s (type=%d/code=%d) %s",
|
||||||
srchost, dsthost, icmptype, ping->type, ping->code, ipinfo);
|
srchost, dsthost, icmptype, ping->type, ping->code, ipinfo);
|
||||||
} else {
|
} else {
|
||||||
snprintf(protoinfo, sizeof(protoinfo), "Unknown protocol (%d): %s",
|
snprintf(protoinfo, sizeof(protoinfo), "Unknown protocol (%d) %s > %s: %s",
|
||||||
ip->ip_p, ipinfo);
|
ip->ip_p, srchost, dsthost, ipinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
return protoinfo;
|
return protoinfo;
|
||||||
|
|||||||
Reference in New Issue
Block a user