]> The Tcpdump Group git mirrors - libpcap/commit
Make some arguments const pointers if that makes sense.
authorguy <guy>
Wed, 2 Jan 2008 04:16:46 +0000 (04:16 +0000)
committerguy <guy>
Wed, 2 Jan 2008 04:16:46 +0000 (04:16 +0000)
commit0446821e49224c6a29be28760cc9c4cc14f56d8a
tree441245d6b2105ff1d2cb4f2e309817d231893f23
parent716cd1f4ddb365a5dc6f3db7950e69b7b10e6d8a
Make some arguments const pointers if that makes sense.

Add some additional checks to bpf_validate(), from OpenBSD.

Use bpf_validate() in install_bpf_program(), so we validate programs
even when they're being processed by userland filters; we make
bpf_validate() not reject backward branches, as we use them for the
protochain operator.

For BPF, don't assume that, just because no_optimize was set, we have a
program that we can't hand to the kernel; the user of the application
might have specified no optimization (e.g., tcpdump with -O), or we
might have generated code to handle 802.11 headers (the optimizer can't
handle that code).  Instead, try handing the filter to the kernel and,
if that fails, try it in userland.

Get rid of BPF_MAXINSNS - we don't have a limit on program size in
libpcap.
bpf/net/bpf_filter.c
bpf_dump.c
bpf_image.c
optimize.c
pcap-bpf.c
pcap/bpf.h
pcap/pcap.h