scapy icon indicating copy to clipboard operation
scapy copied to clipboard

link type 101 should be converted to 12 to avoid pcap_compile_nopcap error

Open crackevil opened this issue 1 year ago • 0 comments

Brief description

link type 101 is described as raw as the same of link type 12, but it will fail function pcap_compile_nopcap(), or some others referring link type. this issue was found at tcpdump() function in utils.py. it uses PcapReader's link type as it, but link type 101 is NOT defined in dlt.h of libpcap. it should convert to 12( not very sure) which is also defined as raw ip.

Scapy version

2.6.1

Python version

3.10

Operating system

windows 10

Additional environment information

No response

How to reproduce

call pcap_compile_nopcap() in lib/winpcapy, link type set to 101, the function returns -1, as link type 12 returns 0

Actual result

No response

Expected result

No response

Related resources

No response

crackevil avatar Nov 06 '24 19:11 crackevil