scapy
scapy copied to clipboard
sniff does not terminate on timeout
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
Timeout seems to be working fine for me. I was not able to reproduce it with Version Scapy 2.6.1 and OS Debian 12. Can you share more details on this.