diff options
| author | Mitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com> | 2017-11-21 02:42:05 -0800 |
|---|---|---|
| committer | mitesh <mitesh@cumulusnetworks.com> | 2018-01-23 15:58:53 -0800 |
| commit | b57ba6d2a893e196fbc96e5ab8ca17d0f8ddf171 (patch) | |
| tree | 8153d61f0934deb6ea3ef4bb527f59c9efcb6625 /bgpd/bgp_debug.c | |
| parent | a6ad0a4183be908b594e70a60a66b67d74b8c946 (diff) | |
bgpd: carry two MPLS labels in EVPN NLRIs
When doing symmetric routing,
EVPN type-2 (MACIP) routes need to be advertised with two labels (VNIs)
the first being the L2 VNI (identifying the VLAN) and
the second being the L3 VNI (identifying the VRF).
The receive processing needs to handle one or two labels too.
Ticket: CM-18489
Review: CCR-6949
Testing: manual and bgp/evpn/mpls smoke
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_debug.c')
| -rw-r--r-- | bgpd/bgp_debug.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 45ac8e6859..b08522b68b 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -2017,8 +2017,9 @@ int bgp_debug_zebra(struct prefix *p) const char *bgp_debug_rdpfxpath2str(afi_t afi, safi_t safi, struct prefix_rd *prd, union prefixconstptr pu, - mpls_label_t *label, int addpath_valid, - u_int32_t addpath_id, char *str, int size) + mpls_label_t *label, u_int32_t num_labels, + int addpath_valid, u_int32_t addpath_id, + char *str, int size) { char rd_buf[RD_ADDRSTRLEN]; char pfx_buf[PREFIX_STRLEN]; @@ -2041,11 +2042,19 @@ const char *bgp_debug_rdpfxpath2str(afi_t afi, safi_t safi, addpath_id); tag_buf[0] = '\0'; - if (bgp_labeled_safi(safi) && label) { - u_int32_t label_value; + if (bgp_labeled_safi(safi) && num_labels) { - label_value = decode_label(label); - sprintf(tag_buf, " label %u", label_value); + if (safi == SAFI_EVPN) { + char tag_buf2[20]; + + bgp_evpn_label2str(label, num_labels, tag_buf2, 20); + sprintf(tag_buf, " label %s", tag_buf2); + } else { + u_int32_t label_value; + + label_value = decode_label(label); + sprintf(tag_buf, " label %u", label_value); + } } if (prd) |
