Skip to content

Commit

Permalink
Merge pull request FRRouting#7291 from ton31337/feature/bgpd_backport…
Browse files Browse the repository at this point in the history
…s_7.5

bgpd: [7.5] Backport maximum-prefix and show bgp neighbor routes for LU fixes
  • Loading branch information
donaldsharp authored Oct 13, 2020
2 parents 632bc6e + 9a4f152 commit 0b27ab2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -3167,7 +3167,8 @@ bool bgp_maximum_prefix_overflow(struct peer *peer, afi_t afi, safi_t safi,
UNSET_FLAG(peer->af_sflags[afi][safi],
PEER_STATUS_PREFIX_LIMIT);

if (pcount > (pcount * peer->pmax_threshold[afi][safi] / 100)) {
if (pcount
> (peer->pmax[afi][safi] * peer->pmax_threshold[afi][safi] / 100)) {
if (CHECK_FLAG(peer->af_sflags[afi][safi],
PEER_STATUS_PREFIX_THRESHOLD)
&& !always)
Expand Down Expand Up @@ -12657,10 +12658,6 @@ static int bgp_show_neighbor_route(struct vty *vty, struct peer *peer,
afi_t afi, safi_t safi,
enum bgp_show_type type, bool use_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;
Expand All @@ -12676,6 +12673,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, use_json,
false);
}
Expand Down

0 comments on commit 0b27ab2

Please sign in to comment.