Merge pull request #7287 from taspelund/ipv4-lu-show-routes

bgpd: fix show bgp neighbor routes for labeled-unicast
This commit is contained in:
Donatas Abraitis 2020-10-13 09:44:50 +03:00 committed by GitHub
commit 43bb4c9b8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12996,10 +12996,6 @@ static int bgp_show_neighbor_route(struct vty *vty, struct peer *peer,
if (use_json)
SET_FLAG(show_flags, BGP_SHOW_OPT_JSON);
/* 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 *json_no = NULL;
@ -13015,6 +13011,10 @@ static int bgp_show_neighbor_route(struct vty *vty, struct peer *peer,
return CMD_WARNING;
}
/* labeled-unicast routes live in the unicast table */
if (safi == SAFI_LABELED_UNICAST)
safi = SAFI_UNICAST;
return bgp_show(vty, peer->bgp, afi, safi, type, &peer->su, show_flags);
}