scapy icon indicating copy to clipboard operation
scapy copied to clipboard

Stop when all listening sockets have closed

Open qris opened this issue 4 years ago • 1 comments

Otherwise, if select() is blocking, with a control socket (close_pipe) remaining in sniff_sockets, the loop will never terminate.

Checklist:

  • [X] If you are new to Scapy: I have checked CONTRIBUTING.md (esp. section submitting-pull-requests)
  • [X] I squashed commits belonging together
  • [ ] I added unit tests or explained why they are not relevant
  • [ ] I executed the regression tests for Python2 and Python3 (using tox or, cd test && ./run_tests_py2, cd test && ./run_tests_py3)
  • [ ] If the PR is still not finished, please create a Draft Pull Request

If select() is blocking, with a control socket (close_pipe) remaining in sniff_sockets, the loop will never terminate. This change fixes that.

fixes #xxx

qris avatar May 10 '21 12:05 qris

Thanks for the report. Good point although the proposed fix is rather inefficient. It would be best to compute this list (set?) only once

gpotter2 avatar May 13 '21 01:05 gpotter2

@qris Are you still pursuing this?

stryngs avatar Dec 06 '22 08:12 stryngs

No, sorry, I'm not using Scapy at the moment.

qris avatar Dec 06 '22 19:12 qris

This was fixed in https://github.com/secdev/scapy/pull/3663.

gpotter2 avatar Feb 04 '24 22:02 gpotter2