libpcap: pass positive BIOCIMMEDIATE to ioctl - #5213
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5213 +/- ##
==========================================
+ Coverage 80.87% 81.17% +0.29%
==========================================
Files 393 393
Lines 98134 98134
==========================================
+ Hits 79368 79662 +294
+ Misses 18766 18472 -294
🚀 New features to boost your workflow:
|
to prevent ioctl from failing with
```
14115 14115 python3 CALL ioctl(3,0xffffffff80044270,0x7f7fff1415b0)
14115 14115 python3 GIO fd 3 wrote 4 bytes
"\^A\0\0\0"
14115 14115 python3 RET ioctl -1 errno 22 Invalid argument
```
and actually turn on immediate mode on 64-bit NetBSD machines.
With this patch applied tests waiting for timely replies
receive those replies in time in libpcap mode.
The negative value was most likely used to get around a bug in Python
2.4 where ioctl failed with
```
OverflowError: signed integer is greater than maximum
```
when the positive value was passed instead. That bug was fixed in Python
2.5 in https://bugs.python.org/issue1231069 and scapy no longer supports
Python 2 anyway.
AI-Assisted: no
evverx
force-pushed
the
positive-biocimmediate
branch
from
October 1, 2026 00:44
5b06e4e to
a3dc2b7
Compare
gpotter2
approved these changes
Oct 1, 2026
Member
|
Thanks for the PR ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
to prevent ioctl from failing with
and actually turn on immediate mode on 64-bit NetBSD machines.
With this patch applied tests waiting for timely replies receive those replies in time in libpcap mode.
The negative value was most likely used to get around a bug in Python 2.4 where ioctl failed with
when the positive value was passed instead. That bug was fixed in Python 2.5 in https://bugs.python.org/issue1231069 and scapy no longer supports Python 2 anyway.
(It should also make it easier to test #5209)