@@ -27,6 +27,7 @@ enum {
NDA_MASTER,
NDA_LINK_NETNSID,
NDA_SRC_VNI,
+ NDA_VPLS_WIRE,
__NDA_MAX
};
@@ -670,6 +670,18 @@ static int fdb_fill_info(struct sk_buff *skb, const struct net_bridge *br,
if (fdb->vlan_id && nla_put(skb, NDA_VLAN, sizeof(u16), &fdb->vlan_id))
goto nla_put_failure;
+ if (fdb->md_dst) {
+ struct metadata_dst *md_dst;
+ md_dst = (struct metadata_dst *)fdb->md_dst;
+ /* ensured in br_fdb_update */
+ BUG_ON(!(md_dst->dst.flags & DST_METADATA));
+
+ if (md_dst->type == METADATA_VPLS) {
+ unsigned wire = md_dst->u.vpls_info.pw_label;
+ if (nla_put_u32(skb, NDA_VPLS_WIRE, wire))
+ goto nla_put_failure;
+ }
+ }
nlmsg_end(skb, nlh);
return 0;
Add a NDA_VPLS_WIRE attribute to the FDB dump if we have dst metadata that is indicative of a VPLS pseudowire. This is really helpful for debugging. Signed-off-by: David Lamparter <equinox@diac24.net> --- include/uapi/linux/neighbour.h | 1 + net/bridge/br_fdb.c | 12 ++++++++++++ 2 files changed, 13 insertions(+)