]> git.baikalelectronics.ru Git - kernel.git/commit
net, neigh: Use NLA_POLICY_MASK helper for NDA_FLAGS_EXT attribute
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 13 Oct 2021 13:21:39 +0000 (15:21 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 15 Oct 2021 02:16:21 +0000 (19:16 -0700)
commit5b3b9c37e569599c5cbbd1d36484007e0f91d3ea
tree9220e491e84de99c5c68d3fe1e015bfec13429ba
parent34d3b400e75cb87c94f104b657fb6403c0289c9b
net, neigh: Use NLA_POLICY_MASK helper for NDA_FLAGS_EXT attribute

Instead of open-coding a check for invalid bits in NTF_EXT_MASK, we can just
use the NLA_POLICY_MASK() helper instead, and simplify NDA_FLAGS_EXT sanity
check this way.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/neighbour.c