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

Account for VLAN header in pcap packets if needed.

This commit is contained in:
dmiller
2025-04-10 19:00:50 +00:00
parent 210d6c0847
commit 5f6bc69983
4 changed files with 32 additions and 17 deletions

View File

@@ -1610,7 +1610,7 @@ int setTargetMACIfAvailable(Target *target, struct link_header *linkhdr,
if (!linkhdr || !target || !src)
return 1;
if (linkhdr->datalinktype != DLT_EN10MB || linkhdr->headerlen != 14)
if (linkhdr->datalinktype != DLT_EN10MB || linkhdr->headerlen < 14)
return 2;
if (!overwrite && target->MACAddress())