]> git.baikalelectronics.ru Git - kernel.git/commit
net, neigh: Reject creating NUD_PERMANENT with NTF_MANAGED entries
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 13 Oct 2021 13:21:40 +0000 (15:21 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 15 Oct 2021 02:16:21 +0000 (19:16 -0700)
commit82446b677391acac5f18365dae4be2f81b557fbb
treeecb461991215ba2658ce6d311ebb87da4a2a78aa
parent5b3b9c37e569599c5cbbd1d36484007e0f91d3ea
net, neigh: Reject creating NUD_PERMANENT with NTF_MANAGED entries

The combination of NUD_PERMANENT + NTF_MANAGED is not supported and does
not make sense either given the former indicates a static/fixed neighbor
entry whereas the latter a dynamically resolved one. While it is possible
to transition from one over to the other, we should however reject such
creation attempts.

Fixes: 5e24df39aec3 ("net, neigh: Add NTF_MANAGED flag for managed neighbor entries")
Suggested-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/neighbour.c