From 11e2785d09f06a68fa169e374bc53f9772087a27 Mon Sep 17 00:00:00 2001 From: vivek Date: Mon, 15 May 2017 14:50:21 -0700 Subject: [PATCH] bgpd: MAC Mobility extended community string conversion Updates: d5b9da8a79cbf2acf287bda2600e86a5a3243c64 Updates: 749513cc9d7bf571b3049931057d544b4111c39d Signed-off-by: Vivek Venkatraman Signed-off-by: Daniel Walton --- bgpd/bgp_ecommunity.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c index bb2ef260ee..9349214348 100644 --- a/bgpd/bgp_ecommunity.c +++ b/bgpd/bgp_ecommunity.c @@ -794,6 +794,18 @@ ecommunity_ecom2str (struct ecommunity *ecom, int format, int filter) macaddr[0], macaddr[1], macaddr[2], macaddr[3], macaddr[4], macaddr[5]); } + else if (*pnt == ECOMMUNITY_EVPN_SUBTYPE_MACMOBILITY) + { + u_int32_t seqnum; + u_char flags = *++pnt; + + memcpy (&seqnum, pnt + 2, 4); + seqnum = ntohl(seqnum); + if (flags & ECOMMUNITY_EVPN_SUBTYPE_MACMOBILITY_FLAG_STICKY) + len = sprintf (str_buf + str_pnt, "MM:%u, sticky MAC", seqnum); + else + len = sprintf (str_buf + str_pnt, "MM:%u", seqnum); + } else unk_ecom = 1; }