Skip to content

Conversation

@guedou
Copy link
Member

@guedou guedou commented Nov 19, 2021

This PR fixes #3445. It turns out that Scapy currently injects raw BPF filter that are not optimized by libpcap. That is why the filter used by @janus1345 hits the memory limit while tcpcpdump does not.

@codecov
Copy link

codecov bot commented Nov 19, 2021

Codecov Report

Merging #3446 (9400ab9) into master (c1f1d6e) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3446      +/-   ##
==========================================
+ Coverage   85.26%   85.30%   +0.03%     
==========================================
  Files         278      278              
  Lines       57656    57902     +246     
==========================================
+ Hits        49162    49391     +229     
- Misses       8494     8511      +17     
Impacted Files Coverage Δ
scapy/arch/common.py 76.66% <ø> (ø)
scapy/arch/libpcap.py 68.51% <100.00%> (-1.04%) ⬇️
scapy/arch/windows/__init__.py 67.73% <0.00%> (-0.57%) ⬇️
scapy/supersocket.py 58.78% <0.00%> (-0.31%) ⬇️
scapy/layers/inet.py 65.92% <0.00%> (-0.08%) ⬇️
scapy/sendrecv.py 81.07% <0.00%> (ø)
scapy/contrib/automotive/uds.py 95.86% <0.00%> (+0.34%) ⬆️

@guedou
Copy link
Member Author

guedou commented Nov 19, 2021

Should I add a unit test?

Copy link
Member

@gpotter2 gpotter2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice catch !
I'm pretty sure I didn't read the doc entirely when implementing those.. oops

@gpotter2 gpotter2 merged commit 276678d into secdev:master Nov 20, 2021
@gpotter2
Copy link
Member

A unit test would be nightmarish

@gpotter2 gpotter2 added this to the 2.5.0 milestone Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

socket.error: [Errno 12] Cannot allocate memory

2 participants