mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-11-01 12:47:16 +00:00
bgpd: Trust the bgp_table_top_nolock for aggregates
The safi passed in to short-circuit the aggregate lookup adds code complexity and little speed improvements for the case where we actually may have aggregates configured! Since bgp_table_top_nolock() actually tells us if there are any aggregates installed and safely returns if there is nothing to do, trust it. As that we know for those safi's were we don't want to have, we dissallow the creation via the cli anyways. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
09990cddff
commit
b89a6450ba
@ -5628,12 +5628,6 @@ void bgp_aggregate_increment(struct bgp *bgp, struct prefix *p,
|
||||
struct bgp_aggregate *aggregate;
|
||||
struct bgp_table *table;
|
||||
|
||||
/* MPLS-VPN aggregation is not yet supported. */
|
||||
if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP)
|
||||
|| (safi == SAFI_EVPN)
|
||||
|| (safi == SAFI_FLOWSPEC))
|
||||
return;
|
||||
|
||||
table = bgp->aggregate[afi][safi];
|
||||
|
||||
/* No aggregates configured. */
|
||||
@ -5667,12 +5661,6 @@ void bgp_aggregate_decrement(struct bgp *bgp, struct prefix *p,
|
||||
struct bgp_aggregate *aggregate;
|
||||
struct bgp_table *table;
|
||||
|
||||
/* MPLS-VPN aggregation is not yet supported. */
|
||||
if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP)
|
||||
|| (safi == SAFI_EVPN)
|
||||
|| (safi == SAFI_FLOWSPEC))
|
||||
return;
|
||||
|
||||
table = bgp->aggregate[afi][safi];
|
||||
|
||||
/* No aggregates configured. */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user