netfilter: disallow bpf hook attachment at same priority
authorFlorian Westphal <fw@strlen.de>
Fri, 21 Apr 2023 17:02:57 +0000 (19:02 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 21 Apr 2023 18:34:14 +0000 (11:34 -0700)
commit0bdc6da88f5bac0f3f272cb6f545c2cc70e8c66a
treef6ac7401b8177e3287940b58f46f005d9203bed9
parent506a74db7e019a277e987fa65654bdd953859d5b
netfilter: disallow bpf hook attachment at same priority

This is just to avoid ordering issues between multiple bpf programs,
this could be removed later in case it turns out to be too cautious.

bpf prog could still be shared with non-bpf hook, otherwise we'd have to
make conntrack hook registration fail just because a bpf program has
same priority.

Signed-off-by: Florian Westphal <fw@strlen.de>
Link: https://lore.kernel.org/r/20230421170300.24115-5-fw@strlen.de
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/netfilter/core.c