diff --git a/include/linux/filter.h b/include/linux/filter.h index 741956fa5bfdcc371ab712ade0210fe5de69fe69..8eeb205f298b078ccbaa714b2d171a50da40096d 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -155,7 +155,7 @@ extern unsigned int sk_run_filter(const struct sk_buff *skb, const struct sock_filter *filter); extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); extern int sk_detach_filter(struct sock *sk); -extern int sk_chk_filter(struct sock_filter *filter, int flen); +extern int sk_chk_filter(struct sock_filter *filter, unsigned int flen); #ifdef CONFIG_BPF_JIT extern void bpf_jit_compile(struct sk_filter *fp); diff --git a/net/core/filter.c b/net/core/filter.c index 8fcc2d776e096164e134db9256cba2ac17dc4a92..5dea452792155fffa062a59641c1862e26f19fe0 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -436,7 +436,7 @@ static int check_load_and_stores(struct sock_filter *filter, int flen) * * Returns 0 if the rule set is legal or -EINVAL if not. */ -int sk_chk_filter(struct sock_filter *filter, int flen) +int sk_chk_filter(struct sock_filter *filter, unsigned int flen) { /* * Valid instructions are initialized to non-0.