Fix sniffer join waiting indefinitely#4781
Conversation
Co-Authored-By: Louis Scalbert <louis.scalbert@6wind.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4781 +/- ##
==========================================
- Coverage 81.23% 81.02% -0.21%
==========================================
Files 363 365 +2
Lines 88404 89067 +663
==========================================
+ Hits 71811 72167 +356
- Misses 16593 16900 +307
🚀 New features to boost your workflow:
|
|
Thanks for the PR. Although I don't understand how you can reach this code (running remains False until you start() ?!), I agree that the current test is broken. |
|
Thank you for the merge. But it is not working for me |
|
To reproduce: I got: Traceback (most recent call last): Basically I am monitoring the interfaces with netlink to start/stop sniffer. It happens in case of flapping |
When trying to stop a sniffer that was not already started, Scapy_Exception("Unsupported (offline or unsupported socket)") is no more raised and join() is waiting indefinitely.
Restore the previous stop_cb behavior.
Fixes: 6689da4 ("Add missing type in AsyncSniffer (#4665)")
Checklist:
cd test && ./run_testsortox)fixes #xxx