summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-03-28 20:17:38 -0400
committerGitHub <noreply@github.com>2019-03-28 20:17:38 -0400
commit36456953c612306906ba4ff834adf3772ffd0b51 (patch)
tree24fd4fc55b12d454310b9358199dfbce961741b0
parent819489d020fa1b5e176d92a782f96b098f779415 (diff)
parentc512a6429c979e4d183512c49937474dbff77967 (diff)
Merge pull request #4038 from manuhalo/fix-lu-bgp-master
bgpd: fix show bgp labeled_unicast
-rw-r--r--bgpd/bgp_route.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index eca632dd44..f7768f921c 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -10774,7 +10774,11 @@ static void show_adj_route(struct vty *vty, struct peer *peer, afi_t afi,
return;
}
- table = bgp->rib[afi][safi];
+ /* labeled-unicast routes live in the unicast table */
+ if (safi == SAFI_LABELED_UNICAST)
+ table = bgp->rib[afi][SAFI_UNICAST];
+ else
+ table = bgp->rib[afi][safi];
output_count = filtered_count = 0;
subgrp = peer_subgroup(peer, afi, safi);
@@ -11028,10 +11032,6 @@ static int peer_adj_routes(struct vty *vty, struct peer *peer, afi_t afi,
if (use_json)
json = json_object_new_object();
- /* labeled-unicast routes live in the unicast table */
- if (safi == SAFI_LABELED_UNICAST)
- safi = SAFI_UNICAST;
-
if (!peer || !peer->afc[afi][safi]) {
if (use_json) {
json_object_string_add(