mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-11-03 04:28:24 +00:00
bgpd: fix display of ethernet vpn route prefix in vty
L2VPN route prefix are composed of ethtag, mac address and ip address. vty command "show bgp l2vpn rd <>" show macip prefix in the following template: [ethtag][macaddress/len][ipaddress/len] Signed-off-by: Julien Courtat <julien.courtat@6wind.com> e
This commit is contained in:
parent
784d3a4299
commit
dc49391e36
@ -5886,6 +5886,11 @@ route_vty_out_route (struct prefix *p, struct vty *vty)
|
||||
else
|
||||
len += vty_out (vty, "/%d", p->prefixlen);
|
||||
}
|
||||
else if (p->family == AF_ETHERNET)
|
||||
{
|
||||
prefix2str(p, buf, PREFIX_STRLEN);
|
||||
len = vty_out (vty, "%s", buf);
|
||||
}
|
||||
else
|
||||
len = vty_out (vty, "%s/%d", inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ),
|
||||
p->prefixlen);
|
||||
@ -7837,11 +7842,15 @@ route_vty_out_detail_header (struct vty *vty, struct bgp *bgp,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (p->family == AF_ETHERNET)
|
||||
prefix2str (p, buf2, INET6_ADDRSTRLEN);
|
||||
else
|
||||
inet_ntop (p->family, &p->u.prefix, buf2, INET6_ADDRSTRLEN);
|
||||
vty_out (vty, "BGP routing table entry for %s%s%s/%d%s",
|
||||
((safi == SAFI_MPLS_VPN || safi == SAFI_ENCAP || safi == SAFI_EVPN) ?
|
||||
prefix_rd2str (prd, buf1, RD_ADDRSTRLEN) : ""),
|
||||
((safi == SAFI_MPLS_VPN) || (safi == SAFI_EVPN)) ? ":" : "",
|
||||
inet_ntop (p->family, &p->u.prefix, buf2, INET6_ADDRSTRLEN),
|
||||
buf2,
|
||||
p->prefixlen, VTY_NEWLINE);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user