scroot / gopacket

Automatically exported from code.google.com/p/gopacket
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Bugfix in pcap.SetBPFFilter and httpassembly example #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
pcap.SetBPFFilter always fail on a Handler that was created by 
pcap.OpenOffline. It fails on the call to C.pcap_lookupnet because the device 
name passed to it is an empty string.

Besides this, the httpassembly example has a duplicate message about capturing 
from interface even when using -r to capture from file, and crashes at the end 
of the capture because of a nil packet. That nil packet actually indicates the 
end of the capture.

Here's the patch: https://gist.github.com/fiorix/433bd0bd8e74c3933a1f

Feel free to remove my comments and adjust as necessary.

Original issue reported on code.google.com by fio...@gmail.com on 16 Oct 2014 at 12:13

GoogleCodeExporter commented 9 years ago
Thanks!  Committed without change in 
https://code.google.com/p/gopacket/source/detail?r=4f6ae80c80ffc57dc789281689348
c472d4a5aeb.

Please let me know if you'd like yourself added as a Contributor in the AUTHORS 
file, and if so, how you'd like to appear.

Original comment by gconnell@google.com on 16 Oct 2014 at 3:53

GoogleCodeExporter commented 9 years ago
Cool. I'd be great to be in the contributors list.
I guess my name and email.. Alexandre Fiori <fiorix@gmail.com> would do.

Looking forward to contribute some more.

Thank you.

Original comment by fio...@gmail.com on 16 Oct 2014 at 3:59

GoogleCodeExporter commented 9 years ago
It'd be great*

Original comment by fio...@gmail.com on 16 Oct 2014 at 11:44