mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 15:47:22 +00:00
bgpd rfapi: fix UN address in show with MPLS TT
Signed-off-by: Lou Berger <lberger@labn.net>
This commit is contained in:
parent
1858c1d1c4
commit
def3f4e942
@ -1175,16 +1175,18 @@ rfapiPrintRemoteRegBi (
|
|||||||
inet_ntop (pfx_un.family, &pfx_un.u.prefix, buf_ntop,
|
inet_ntop (pfx_un.family, &pfx_un.u.prefix, buf_ntop,
|
||||||
BUFSIZ));
|
BUFSIZ));
|
||||||
}
|
}
|
||||||
buf_un[BUFSIZ - 1] = 0;
|
|
||||||
|
|
||||||
rfapiGetTunnelType(bi->attr,&tun_type);
|
rfapiGetTunnelType(bi->attr,&tun_type);
|
||||||
/*
|
/*
|
||||||
* VN addr
|
* VN addr
|
||||||
*/
|
*/
|
||||||
buf_vn[0] = 0;
|
buf_vn[0] = 0;
|
||||||
|
rfapiNexthop2Prefix (bi->attr, &pfx_vn);
|
||||||
if (tun_type == BGP_ENCAP_TYPE_MPLS)
|
if (tun_type == BGP_ENCAP_TYPE_MPLS)
|
||||||
{
|
{
|
||||||
/* MPLS carries un in nrli next hop (same as vn for IP tunnels) */
|
/* MPLS carries un in nrli next hop (same as vn for IP tunnels) */
|
||||||
|
snprintf (buf_un, BUFSIZ, "%s",
|
||||||
|
inet_ntop (pfx_vn.family, &pfx_vn.u.prefix, buf_ntop, BUFSIZ));
|
||||||
if (bi->extra)
|
if (bi->extra)
|
||||||
{
|
{
|
||||||
u_int32_t l = decode_label (bi->extra->tag);
|
u_int32_t l = decode_label (bi->extra->tag);
|
||||||
@ -1197,12 +1199,11 @@ rfapiPrintRemoteRegBi (
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rfapiNexthop2Prefix (bi->attr, &pfx_vn);
|
|
||||||
snprintf (buf_vn, BUFSIZ, "%s",
|
snprintf (buf_vn, BUFSIZ, "%s",
|
||||||
inet_ntop (pfx_vn.family, &pfx_vn.u.prefix, buf_ntop, BUFSIZ));
|
inet_ntop (pfx_vn.family, &pfx_vn.u.prefix, buf_ntop, BUFSIZ));
|
||||||
}
|
}
|
||||||
buf_vn[BUFSIZ - 1] = 0;
|
buf_vn[BUFSIZ - 1] = 0;
|
||||||
|
buf_un[BUFSIZ - 1] = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cost is encoded in local_pref as (255-cost)
|
* Cost is encoded in local_pref as (255-cost)
|
||||||
|
Loading…
Reference in New Issue
Block a user