OSDN Git Service

bpf: Allow bpf_get_netns_cookie in BPF_PROG_TYPE_SOCK_OPS
authorXu Liu <liuxu623@gmail.com>
Wed, 18 Aug 2021 10:58:19 +0000 (18:58 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 18 Aug 2021 22:30:01 +0000 (00:30 +0200)
commit6cf1770d63dd2d0d0d4048e7b3ee360336c072d9
treee7acefe8abd58d375086d7b064f2e4fedae60f04
parentd20b41115ad53293201cc07ee429a38740cb056b
bpf: Allow bpf_get_netns_cookie in BPF_PROG_TYPE_SOCK_OPS

We'd like to be able to identify netns from sockops hooks to
accelerate local process communication form different netns.

Signed-off-by: Xu Liu <liuxu623@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20210818105820.91894-2-liuxu623@gmail.com
net/core/filter.c