1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 20:29:03 +00:00

Use ip_get_data_any, not ip_get_data, in ippackethdrinfo.

The difference is that ip_get_data_any doesn't require there to be an
upper-layer header at the end of an IPv6 chain. This avoids the message
"BOGUS!  Can't parse supposed IP packet" during -sO -6 scan. The -sO
sends non–upper-layer headers, some even with empty payloads, and so
causes this situation often.
This commit is contained in:
david
2012-02-24 05:01:41 +00:00
parent bdea1b3a9c
commit c1e1a12e2c

View File

@@ -2167,7 +2167,7 @@ const char *ippackethdrinfo(const u8 *packet, u32 len, int detail) {
int reserved_flag = 0; /* True if IP Reserved flag is set. */
datalen = len;
data = (u8 *) ip_get_data(packet, &datalen, &hdr);
data = (u8 *) ip_get_data_any(packet, &datalen, &hdr);
if (data == NULL)
return "BOGUS! Can't parse supposed IP packet";