mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Copy link header from beginning of frame, not beginning of IP header.
This commit is contained in:
2
tcpip.cc
2
tcpip.cc
@@ -1612,7 +1612,7 @@ const u8 *readip_pcap(pcap_t *pd, unsigned int *len, long to_usec,
|
||||
linknfo->datalinktype = datalink;
|
||||
linknfo->headerlen = offset;
|
||||
assert(offset <= MAX_LINK_HEADERSZ);
|
||||
memcpy(linknfo->header, p, MIN(sizeof(linknfo->header), offset));
|
||||
memcpy(linknfo->header, p - offset, MIN(sizeof(linknfo->header), offset));
|
||||
}
|
||||
if (rcvdtime)
|
||||
PacketTrace::trace(PacketTrace::RCVD, (u8 *) p, *len,
|
||||
|
||||
Reference in New Issue
Block a user