-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Restore sndrcv behaviour from before 53afe84 #4538
Conversation
Aims to fix #4531 |
Thanks a lot for figuring this out, this is great work ! |
I was trying, if this would immediately fix the unit tests. But my next guess is, that we may need to remove the daemon flag of the send thread.
--
Mit freundlichen Grüßen
Dr. Nils Weiß
dissecto GmbH
Franz-Mayer-Str. 1
93053 Regensburg
________________________________
From: gpotter2 ***@***.***>
Sent: Sunday, September 22, 2024 2:48:59 PM
To: secdev/scapy ***@***.***>
Cc: Dr. Nils Weiß ***@***.***>; Author ***@***.***>
Subject: Re: [secdev/scapy] Restore sndrcv behaviour from before 53afe84 (PR #4538)
@gpotter2 commented on this pull request.
________________________________
In scapy/sendrecv.py<#4538 (comment)>:
@@ -357,6 +357,7 @@ def sndrcv(*args, **kwargs):
WARNING: This is an internal function. Using sr/srp/sr1/srp is
more appropriate in many cases.
"""
+ kwargs['threaded'] = kwargs.pop('threaded', True) or True
Why this commit?
—
Reply to this email directly, view it on GitHub<#4538 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAMZGFZ4CDPX6JVXG3VMTWDZX24DXAVCNFSM6AAAAABOUIRDESVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMRQHA2DQMRSG4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
450d941
to
56e82b2
Compare
f4e06ce
to
9e5d6e6
Compare
Seems to really be failing on the |
Try to get it debug as soon as possible |
Could I get #4533 merged before I start debugging? |
Sure thing ! |
6a5faf5
to
65100e7
Compare
a05c650
to
1b12525
Compare
@gpotter2 Ready from my side |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4538 +/- ##
==========================================
- Coverage 81.59% 81.58% -0.01%
==========================================
Files 356 356
Lines 85272 85271 -1
==========================================
- Hits 69574 69571 -3
- Misses 15698 15700 +2
|
Seems stable enough. Thanks a lot ! |
This PR rolls back the internal behaviour of sndrcv from before 53afe84
Two major changes happend in 53afe84
inter
is only forwarded totime.sleep
if it is not0
. However, callingtime.sleep(0)
gives the python threading system the possibility to do a context switch.sr
was always executed inthreaded
mode.