]> The Tcpdump Group git mirrors - libpcap/commitdiff
pcap-npf.c: handle NdisMediumIP.
authorfghzxm <[email protected]>
Wed, 23 Jun 2021 09:38:15 +0000 (17:38 +0800)
committerGuy Harris <[email protected]>
Sat, 26 Jun 2021 07:03:59 +0000 (00:03 -0700)
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 <[email protected]>
(cherry picked from commit c1a7c0802ae38f90491d267d3bd8d2a4057903fb)

pcap-npf.c

index 52aee78a98ae2973903e2f4c99414b46dd3b0c5d..bf309baafc8578ac08696b5793f4661459084a57 100644 (file)
@@ -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