Skip to content
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

pcap listener doesn't shutdown on ctrl-c #5

Closed
msiodelski opened this issue Mar 25, 2023 · 1 comment
Closed

pcap listener doesn't shutdown on ctrl-c #5

msiodelski opened this issue Mar 25, 2023 · 1 comment
Assignees
Labels
bug Something isn't working pcap Traffic capturing code
Milestone

Comments

@msiodelski
Copy link
Owner

As discussed in the following thread: the-tcpdump-group/libpcap#572, on modern Linux distributions where TPACKET_V3 is used, setting the timeout value on the capture does not break listening after the timeout before receiving the first packet. As a result, the current endure code blocks infinitely without checking if the dispatcher should shutdown. Killing the process is the only way to exit. It can be mitigated be performing an active check if the shutdown is progressing and simply exit if it doesn't.

msiodelski added a commit that referenced this issue Mar 27, 2023
Simplified the dispatcher and the listner. They no longer attempt stopping
the listener threads on exit as it is not possible to do it reliably.
msiodelski added a commit that referenced this issue Mar 27, 2023
msiodelski added a commit that referenced this issue Mar 27, 2023
Simplified the dispatcher and the listner. They no longer attempt stopping
the listener threads on exit as it is not possible to do it reliably.
msiodelski added a commit that referenced this issue Mar 27, 2023
@msiodelski msiodelski self-assigned this Mar 27, 2023
@msiodelski msiodelski added bug Something isn't working pcap Traffic capturing code labels Mar 27, 2023
@msiodelski
Copy link
Owner Author

Fixed with #6

@msiodelski msiodelski added this to the endure v0.1.0 milestone Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pcap Traffic capturing code
Projects
None yet
Development

No branches or pull requests

1 participant