From e50d0a485751e5ed53ff3a283d51f3996ddc25ff 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 5c157b9539..13279f89b1 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -10434,10 +10434,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