Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scapy/arch/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import socket

from scapy.config import conf
from scapy.data import MTU, ARPHRD_TO_DLT
from scapy.data import MTU, ARPHRD_TO_DLT, DLT_RAW_ALT, DLT_RAW
from scapy.error import Scapy_Exception, warning
from scapy.interfaces import network_name, resolve_iface, NetworkInterface
from scapy.libs.structures import bpf_program
Expand Down Expand Up @@ -106,6 +106,9 @@ def compile_filter(filter_exp, # type: str
# Failed to use linktype: use the interface
pass
if linktype is not None:
# Some conversion aliases (e.g. linktype_to_dlt in libpcap)
if linktype == DLT_RAW_ALT:
linktype = DLT_RAW
ret = pcap_compile_nopcap(
MTU, linktype, ctypes.byref(bpf), bpf_filter, 1, -1
)
Expand Down
Loading