From ebb0c02ad3c985db4c185e5ac599fb54cc0dc37f Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 19 May 2017 16:51:46 -0300 Subject: [PATCH] bgpd: fix display of encap routes in the running configuration Static encap routes don't have an MPLS label. Also, use %u instead of %d to print the label. Signed-off-by: Renato Westphal --- bgpd/bgp_route.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index e9f6cba127..fc89bc046b 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -10672,10 +10672,12 @@ bgp_config_write_network_vpn (struct vty *vty, struct bgp *bgp, prefix_rd2str (prd, rdbuf, RD_ADDRSTRLEN); label = decode_label (bgp_static->tag); - vty_out (vty, " network %s/%d rd %s label %d", + vty_out (vty, " network %s/%d rd %s", inet_ntop (p->family, &p->u.prefix, buf, SU_ADDRSTRLEN), - p->prefixlen, - rdbuf, label); + p->prefixlen, rdbuf); + if (safi == SAFI_MPLS_VPN) + vty_out (vty, " label %u", label); + if (bgp_static->rmap.name) vty_out (vty, " route-map %s", bgp_static->rmap.name); else -- 2.39.5