Skip to content

Fix compile_filter on *BSD with non-ether linktypes #4670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 26, 2025

Conversation

gpotter2
Copy link
Member

I really have no idea why this line exists in the first place. It makes very little sense to me

@gpotter2
Copy link
Member Author

Ah I see, to allow to compile filters without root. I mean if the filters it compiles are broken it's not that useful.

Shouldn't be hard to fix if the interface type is provided from PFROUTE.

Copy link

codecov bot commented Feb 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.10%. Comparing base (7275516) to head (14658e5).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4670      +/-   ##
==========================================
+ Coverage   81.90%   82.10%   +0.20%     
==========================================
  Files         359      359              
  Lines       86574    86615      +41     
==========================================
+ Hits        70909    71118     +209     
+ Misses      15665    15497     -168     
Files with missing lines Coverage Δ
scapy/arch/bpf/pfroute.py 92.51% <100.00%> (+0.04%) ⬆️
scapy/arch/common.py 68.96% <100.00%> (-1.04%) ⬇️
scapy/data.py 90.83% <ø> (ø)

... and 25 files with indirect coverage changes

@sthen
Copy link

sthen commented Feb 22, 2025

Great, confirmed this fixes things for me. Many thanks!

@gpotter2 gpotter2 merged commit 96d612b into secdev:master Feb 26, 2025
23 checks passed
@gpotter2 gpotter2 deleted the bsd-linktype-lo branch February 26, 2025 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sr with filter not working on loopback on OpenBSD
2 participants