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.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -6,6 +6,8 @@ · 5 unmodified lines | ||
| 6 | 6 | |
| 7 | 7 | #define XT_BPF_MAX_NUM_INSTR 64 |
| 8 | 8 | |
| 9 | +struct sk_filter; | |
| 10 | + | |
| 9 | 11 | struct xt_bpf_info { |
| 10 | 12 | __u16 bpf_program_num_elem; |
| 11 | 13 | struct sock_filter bpf_program[XT_BPF_MAX_NUM_INSTR]; |