diff options
author | Mitesh Kanjariya <mitesh@cumulusnetworks.com> | 2017-10-09 13:55:57 +0200 |
---|---|---|
committer | Mitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com> | 2017-12-14 19:57:05 +0100 |
commit | bc59a6720c51482ff41f0f1f903ef9370dcd01cf (patch) | |
tree | 156603af8dceccd85e473bbe7871570afd02e777 /bgpd/bgp_ecommunity.c | |
parent | zebra: don't get rmac in remote macip delete (diff) | |
download | frr-bc59a6720c51482ff41f0f1f903ef9370dcd01cf.tar.xz frr-bc59a6720c51482ff41f0f1f903ef9370dcd01cf.zip |
bgpd: rmac ext comm
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_ecommunity.c')
-rw-r--r-- | bgpd/bgp_ecommunity.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c index e19f51650..9caf38d56 100644 --- a/bgpd/bgp_ecommunity.c +++ b/bgpd/bgp_ecommunity.c @@ -695,19 +695,19 @@ char *ecommunity_ecom2str(struct ecommunity *ecom, int format, int filter) } else if (type == ECOMMUNITY_ENCODE_EVPN) { if (filter == ECOMMUNITY_ROUTE_TARGET) continue; - if (*pnt == ECOMMUNITY_SITE_ORIGIN) { - char macaddr[6]; + if (*pnt == ECOMMUNITY_EVPN_SUBTYPE_ROUTERMAC) { + struct ethaddr rmac; pnt++; - memcpy(&macaddr, pnt, 6); + memcpy(&rmac, pnt, ETH_ALEN); len = sprintf( str_buf + str_pnt, - "EVPN:%02x:%02x:%02x:%02x:%02x:%02x", - (uint8_t)macaddr[0], - (uint8_t)macaddr[1], - (uint8_t)macaddr[2], - (uint8_t)macaddr[3], - (uint8_t)macaddr[4], - (uint8_t)macaddr[5]); + "Rmac:%02x:%02x:%02x:%02x:%02x:%02x", + (uint8_t)rmac.octet[0], + (uint8_t)rmac.octet[1], + (uint8_t)rmac.octet[2], + (uint8_t)rmac.octet[3], + (uint8_t)rmac.octet[4], + (uint8_t)rmac.octet[5]); } else if (*pnt == ECOMMUNITY_EVPN_SUBTYPE_MACMOBILITY) { u_int32_t seqnum; |