]> The Tcpdump Group git mirrors - libpcap/commitdiff
Merge pull request #414 from peugnezb/correctifs
authorGuy Harris <[email protected]>
Tue, 3 Feb 2015 20:07:13 +0000 (12:07 -0800)
committerGuy Harris <[email protected]>
Tue, 3 Feb 2015 20:07:13 +0000 (12:07 -0800)
Bug fixes to gencode.c/gencode.h and pcap-linux.c

If tp version is not valid, we don't do anything in the switch, and thus don't set req.tp_frame_nr, but we later use it.  (This "shouldn't happen", as we should never use a TPACKET_ version we don't handle, but this catches that case in case it can happen.)

The variable "len" needs to be initialized to the buffer size "&bpf_extensions" - it's a value-result parameter in getsockopt(), which should be set to the size of the buffer being passed.

Make the mask length parameter in some gencode.c routines unsigned.

Close a socket file descriptor in the right place.


Trivial merge