mirror of
https://github.com/nmap/nmap.git
synced 2025-12-17 13:09:02 +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:
@@ -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. */
|
int reserved_flag = 0; /* True if IP Reserved flag is set. */
|
||||||
|
|
||||||
datalen = len;
|
datalen = len;
|
||||||
data = (u8 *) ip_get_data(packet, &datalen, &hdr);
|
data = (u8 *) ip_get_data_any(packet, &datalen, &hdr);
|
||||||
if (data == NULL)
|
if (data == NULL)
|
||||||
return "BOGUS! Can't parse supposed IP packet";
|
return "BOGUS! Can't parse supposed IP packet";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user