From: fghzxm Date: Wed, 23 Jun 2021 09:38:15 +0000 (+0800) Subject: pcap-npf.c: handle NdisMediumIP. X-Git-Tag: libpcap-1.10.2~398 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/c9ca9b4c6da9c09608d1802d73da072335b87bd0 pcap-npf.c: handle NdisMediumIP. The NDIS medium type NdisMediumIP transports raw IP packets. If we encounter such an interface, say it's DLT_RAW. Related to nmap/npcap#173. Signed-off-by: fghzxm (cherry picked from commit c1a7c0802ae38f90491d267d3bd8d2a4057903fb) --- diff --git a/pcap-npf.c b/pcap-npf.c index 52aee78a..bf309baa 100644 --- a/pcap-npf.c +++ b/pcap-npf.c @@ -1127,6 +1127,10 @@ pcap_activate_npf(pcap_t *p) p->linktype = DLT_RAW; break; + case NdisMediumIP: + p->linktype = DLT_RAW; + break; + default: /* * An unknown medium type is assumed to supply Ethernet