summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorNikolay Aleksandrov <razor@blackwall.org>2022-04-13 13:52:00 +0300
committerDavid S. Miller <davem@davemloft.net>2022-04-13 14:46:26 +0300
commitea2c0f9e3fc2f94f090d693b7235c02af1289629 (patch)
treec617fbaf00b02a69b164aed1b79a277c95481e99 /net/core
parent1f78ee14eeac03952ec765cea7ce23cbf12d6894 (diff)
downloadlinux-ea2c0f9e3fc2f94f090d693b7235c02af1289629.tar.xz
net: rtnetlink: add ndm flags and state mask attributes
Add ndm flags/state masks which will be used for bulk delete filtering. All of these are used by the bridge and vxlan drivers. Also minimal attr policy validation is added, it is up to ndo_fdb_del_bulk implementers to further validate them. Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/rtnetlink.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 520d50fcaaea..ab7fb9a16da9 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -4172,6 +4172,8 @@ EXPORT_SYMBOL(ndo_dflt_fdb_del);
static const struct nla_policy fdb_del_bulk_policy[NDA_MAX + 1] = {
[NDA_VLAN] = { .type = NLA_U16 },
[NDA_IFINDEX] = NLA_POLICY_MIN(NLA_S32, 1),
+ [NDA_NDM_STATE_MASK] = { .type = NLA_U16 },
+ [NDA_NDM_FLAGS_MASK] = { .type = NLA_U8 },
};
static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh,