]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: sock_map fixes for !CONFIG_BPF_SYSCALL and !STREAM_PARSER
authorJohn Fastabend <john.fastabend@gmail.com>
Wed, 16 Aug 2017 22:02:32 +0000 (15:02 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Aug 2017 22:34:13 +0000 (15:34 -0700)
commit78e7c6a6af90c6a2bb32894085ffa747161bec80
tree4757c35f412230312d7c5b36bd50add6e590224d
parent24c5ef180d7510f10efbd76502efaa9d46a99561
bpf: sock_map fixes for !CONFIG_BPF_SYSCALL and !STREAM_PARSER

Resolve issues with !CONFIG_BPF_SYSCALL and !STREAM_PARSER

net/core/filter.c: In function ‘do_sk_redirect_map’:
net/core/filter.c:1881:3: error: implicit declaration of function ‘__sock_map_lookup_elem’ [-Werror=implicit-function-declaration]
   sk = __sock_map_lookup_elem(ri->map, ri->ifindex);
   ^
net/core/filter.c:1881:6: warning: assignment makes pointer from integer without a cast [enabled by default]
   sk = __sock_map_lookup_elem(ri->map, ri->ifindex);

Fixes: c1f8f893521d ("bpf: sockmap with sk redirect support")
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/bpf.h
include/linux/bpf_types.h
kernel/bpf/Makefile
kernel/bpf/core.c