sniff does not terminate on timeout
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 12.6k
- Forks
- 2.2k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 56
Description
Brief description
OS Debian 12, scapy v.2.6.1
The timeout parameter does not work when capturing packets:
sniff(iface = interface, filter=“port 9999”, count = 1, timeout = 10)
If there are no packets to capture, sniff should terminate after 10 seconds, but it does not - the program hangs.
Scapy version
2.6.1
Python version
3.11.2
Operating system
Linux 6.1.0-26-amd64 x86_64
Additional environment information
No response
How to reproduce
data = sniff(iface = interface, filter="port 9999", count = 1, timeout = 10)
print(data)
Actual result
No response
Expected result
No response
Related resources
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at Scapy's sniff entry point and run the provided reproduction with Debian 12, Python 3.11.2, Scapy 2.6.1, and no packets on port 9999. Trace how count and timeout are handled during capture, then verify that the command returns after 10 seconds and add or update coverage for this scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100