-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
I'm wondering if there are any known issues with the scapy being used in multi-threaded applications.
Please refer to the attached scapy_multithreaded.py application. It has two functions: rtt_ip_ICMP(ip) and rtt_ip_UDP(ip) which send ICMP and UDP packets respectively to 127.0.0.1 (also with 127.0.0.1 srcip).
They work fine in single-thread application but in case of multi-threaded app lot of responses are missing.
Attaching python script as well as the output from command:
./scapy_multithreaded.py > scapy_multithreaded.txt
Scapy: 2.3.3
Linux 2.6.32-573.3.1.el6.x86_64 #1 SMP Thu Aug 13 22:55:16 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Python 2.7.6
BTW I noticed that the workaround for this issue might be changing in load_ips() function, line 41 ThreadPoolExecutor to ProcessPoolExecutor. Anyway I have a strong impression this is an indication of a bug in scapy.