Skip to content

Commit 8ec02a0

Browse files
committed
Tryout BPF simplification
1 parent 30d081f commit 8ec02a0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

scapy/arch/bpf/supersocket.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from scapy.arch.bpf.consts import BIOCGBLEN, BIOCGDLT, BIOCGSTATS, \
1616
BIOCIMMEDIATE, BIOCPROMISC, BIOCSBLEN, BIOCSETIF, BIOCSHDRCMPLT, \
1717
BPF_BUFFER_LENGTH, BIOCSDLT, DLT_IEEE802_11_RADIO
18-
from scapy.automaton import ObjectPipe
1918
from scapy.config import conf
2019
from scapy.consts import FREEBSD, NETBSD, DARWIN
2120
from scapy.data import ETH_P_ALL
@@ -36,6 +35,7 @@ class _L2bpfSocket(SuperSocket):
3635
""""Generic Scapy BPF Super Socket"""
3736

3837
desc = "read/write packets using BPF"
38+
async_select_unrequired = True
3939

4040
def __init__(self, iface=None, type=ETH_P_ALL, promisc=None, filter=None,
4141
nofilter=0, monitor=False):
@@ -389,8 +389,6 @@ def bpf_select(fds_list, timeout=None):
389389
select_fds.append(tmp_fd)
390390

391391
if select_fds:
392-
if len(select_fds) == 1 and isinstance(select_fds[0], ObjectPipe):
393-
return bpf_scks_buffered
394392
# Call select for sockets with empty buffers
395393
if timeout is None:
396394
timeout = 0.05

0 commit comments

Comments
 (0)