]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nft_socket: make cgroup match work in input too
authorFlorian Westphal <fw@strlen.de>
Sat, 9 Apr 2022 11:20:19 +0000 (13:20 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 11 Apr 2022 10:12:46 +0000 (12:12 +0200)
commit9aab4c3a961811c9c27f6a089bc3d80a4d6fbcb1
treef5e9df44d3007aa1ea626be40668c707af2bcff4
parentfa40b4f619467e855411787b0245c8c6593de2ee
netfilter: nft_socket: make cgroup match work in input too

cgroupv2 helper function ignores the already-looked up sk
and uses skb->sk instead.

Just pass sk from the calling function instead; this will
make cgroup matching work for udp and tcp in input even when
edemux did not set skb->sk already.

Fixes: b7332d704204 ("netfilter: nft_socket: add support for cgroupsv2")
Signed-off-by: Florian Westphal <fw@strlen.de>
Tested-by: Topi Miettinen <toiwoton@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_socket.c