cvs commit: src/sys/net bpf_filter.c

Darren Reed darrenr at
Sat Dec 31 06:50:27 PST 2005

On Thu, Dec 08, 2005 at 12:05:03AM +0000, Jung-uk Kim wrote:
> jkim        2005-12-08 00:05:03 UTC
>   FreeBSD src repository
>   Modified files:
>     sys/net              bpf_filter.c 
>   Log:
>   Do not accept an empty bpf program.

You need to make one of two follow up changes here:

1) explicitly allow 0-length programs

2) fix bpf_filter (see the first check and its comments for "return -1")

Personally I'd prefer to see (1) because it allows you
to "set" a BPF program and measure the performance impact
of the BPF code on networking without having to worry
about the cost of executing the BPF program itself.


More information about the cvs-src mailing list