Skip to content

Commit

Permalink
netfilter: xt_bpf: add mising opaque struct sk_filter definition
Browse files Browse the repository at this point in the history
This structure is not exposed to userspace, so fix this by defining
struct sk_filter; so we skip the casting in kernelspace. This is safe
since userspace has no way to lurk with that internal pointer.

Fixes: e6f30c7 ("netfilter: x_tables: add xt_bpf match")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Pablo Neira authored and David S. Miller committed Jul 31, 2014
1 parent 5160ee9 commit e10038a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/uapi/linux/netfilter/xt_bpf.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#define XT_BPF_MAX_NUM_INSTR 64

struct sk_filter;

struct xt_bpf_info {
__u16 bpf_program_num_elem;
struct sock_filter bpf_program[XT_BPF_MAX_NUM_INSTR];
Expand Down

0 comments on commit e10038a

Please sign in to comment.