]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: use skb_to_full_sk helper in bpf_skb_under_cgroup
authorDaniel Borkmann <daniel@iogearbox.net>
Thu, 22 Sep 2016 23:28:35 +0000 (01:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Sep 2016 12:40:27 +0000 (08:40 -0400)
commit89f76377edb42dcf5cec9737d2dca7f41634fead
tree8d151ae6b835443eed4fe639c90162a346fe0c7c
parent72fda2a40274aa5301f77c51552d77c057dd9940
bpf: use skb_to_full_sk helper in bpf_skb_under_cgroup

We need to use skb_to_full_sk() helper introduced in commit 097e7426c6fc
("xfrm: take care of request sockets") as otherwise we miss tcp synack
messages, since ownership is on request socket and therefore it would
miss the sk_fullsock() check. Use skb_to_full_sk() as also done similarly
in the bpf_get_cgroup_classid() helper via 53ef7f527c7a ("cls_cgroup:
get sk_classid only from full sockets") fix to not let this fall through.

Fixes: a7a66e65a016 ("cgroup: bpf: Add bpf_skb_in_cgroup_proto")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/filter.c