pynetwork / pypcap

pypcap - python libpcap module, forked from code.google.com/p/pypcap
Other
297 stars 74 forks source link

fix overwritten packets #80

Closed teokp closed 5 years ago

teokp commented 5 years ago

Remove use of static variables in pcap_ex_next. The static variables cause packets to be overwritten when running loops in multiple threads, probably similar issue as #39 and #43.

hellais commented 5 years ago

Thanks for putting this together!

Yes, I believe this is the correct fix to the problem and it's great you also wrote some unittest for it.

I am merging this and considering this PR to superseed: https://github.com/pynetwork/pypcap/pull/43.