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 <renato@opensourcerouting.org>
This commit is contained in:
Renato Westphal 2017-05-19 16:51:46 -03:00 committed by Donald Sharp
parent 239b498d3f
commit e50d0a4857

View File

@ -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