diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-09-22 08:52:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-22 08:52:09 +0200 |
commit | d24f4b7d84e3c1937a3edc87ed00ecfb3dd8e784 (patch) | |
tree | f5502935c226090e51b9aacb162349a9168e56c2 /bgpd/bgp_route.c | |
parent | Merge pull request #9641 from idryzhov/vtysh-vrf-sort (diff) | |
parent | bgpd: make show bgp labeled-unicast work (diff) | |
download | frr-d24f4b7d84e3c1937a3edc87ed00ecfb3dd8e784.tar.xz frr-d24f4b7d84e3c1937a3edc87ed00ecfb3dd8e784.zip |
Merge pull request #9645 from mjstapp/fix_show_bgp_lu
bgpd: make show bgp labeled-unicast work
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r-- | bgpd/bgp_route.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 647ad5530..44629b3d7 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -11172,6 +11172,10 @@ static int bgp_show(struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi, return CMD_WARNING; } + /* Labeled-unicast routes live in the unicast table. */ + if (safi == SAFI_LABELED_UNICAST) + safi = SAFI_UNICAST; + table = bgp->rib[afi][safi]; /* use MPLS and ENCAP specific shows until they are merged */ if (safi == SAFI_MPLS_VPN) { @@ -11184,9 +11188,6 @@ static int bgp_show(struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi, output_arg, use_json, 1, NULL, NULL); } - /* labeled-unicast routes live in the unicast table */ - else if (safi == SAFI_LABELED_UNICAST) - safi = SAFI_UNICAST; return bgp_show_table(vty, bgp, safi, table, type, output_arg, NULL, 1, NULL, NULL, &json_header_depth, show_flags, |