OSDN Git Service

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)
commitc8e80c1169b2b3b91453f9ff3c34687c42233ef7
tree9220e491e84de99c5c68d3fe1e015bfec13429ba
parent507c2f1d2936e07aef83734983a36df01b458ef9
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