Commit 899426b3 authored by Nikolay Aleksandrov's avatar Nikolay Aleksandrov Committed by David S. Miller

net: neighbor: add fdb extended attribute

Add an attribute to NDA which will contain all future fdb-specific
attributes in order to avoid polluting the NDA namespace with e.g.
bridge or vxlan specific attributes. The attribute is called
NDA_FDB_EXT_ATTRS and the structure would look like:
 [NDA_FDB_EXT_ATTRS] = {
    [NFEA_xxx]
 }
Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0592ff88
...@@ -30,6 +30,7 @@ enum { ...@@ -30,6 +30,7 @@ enum {
NDA_SRC_VNI, NDA_SRC_VNI,
NDA_PROTOCOL, /* Originator of entry */ NDA_PROTOCOL, /* Originator of entry */
NDA_NH_ID, NDA_NH_ID,
NDA_FDB_EXT_ATTRS,
__NDA_MAX __NDA_MAX
}; };
...@@ -172,4 +173,15 @@ enum { ...@@ -172,4 +173,15 @@ enum {
}; };
#define NDTA_MAX (__NDTA_MAX - 1) #define NDTA_MAX (__NDTA_MAX - 1)
/* embedded into NDA_FDB_EXT_ATTRS:
* [NDA_FDB_EXT_ATTRS] = {
* ...
* }
*/
enum {
NFEA_UNSPEC,
__NFEA_MAX
};
#define NFEA_MAX (__NFEA_MAX - 1)
#endif #endif
...@@ -1783,6 +1783,7 @@ const struct nla_policy nda_policy[NDA_MAX+1] = { ...@@ -1783,6 +1783,7 @@ const struct nla_policy nda_policy[NDA_MAX+1] = {
[NDA_MASTER] = { .type = NLA_U32 }, [NDA_MASTER] = { .type = NLA_U32 },
[NDA_PROTOCOL] = { .type = NLA_U8 }, [NDA_PROTOCOL] = { .type = NLA_U8 },
[NDA_NH_ID] = { .type = NLA_U32 }, [NDA_NH_ID] = { .type = NLA_U32 },
[NDA_FDB_EXT_ATTRS] = { .type = NLA_NESTED },
}; };
static int neigh_delete(struct sk_buff *skb, struct nlmsghdr *nlh, static int neigh_delete(struct sk_buff *skb, struct nlmsghdr *nlh,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment