bgpd: Remove AGGREGATE_NEXTHOP_CHECK as it's been unused

The #define AGGREGATE_NEXTHOP_CHECK has not been used
for a very very long time.  Since this is effectively
dead code, let's remove it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2018-06-01 14:23:44 -04:00
parent b89a6450ba
commit 4c80d4ccba

View File

@ -5447,24 +5447,12 @@ static void bgp_aggregate_route(struct bgp *bgp, struct prefix *p,
struct aspath *asmerge = NULL; struct aspath *asmerge = NULL;
struct community *community = NULL; struct community *community = NULL;
struct community *commerge = NULL; struct community *commerge = NULL;
#if defined(AGGREGATE_NEXTHOP_CHECK)
struct in_addr nexthop;
uint32_t med = 0;
#endif
struct bgp_info *ri; struct bgp_info *ri;
struct bgp_info *new; struct bgp_info *new;
int first = 1; int first = 1;
unsigned long match = 0; unsigned long match = 0;
uint8_t atomic_aggregate = 0; uint8_t atomic_aggregate = 0;
/* Record adding route's nexthop and med. */
if (rinew) {
#if defined(AGGREGATE_NEXTHOP_CHECK)
nexthop = rinew->attr->nexthop;
med = rinew->attr->med;
#endif
}
/* ORIGIN attribute: If at least one route among routes that are /* ORIGIN attribute: If at least one route among routes that are
aggregated has ORIGIN with the value INCOMPLETE, then the aggregated has ORIGIN with the value INCOMPLETE, then the
aggregated route must have the ORIGIN attribute with the value aggregated route must have the ORIGIN attribute with the value
@ -5490,27 +5478,8 @@ static void bgp_aggregate_route(struct bgp *bgp, struct prefix *p,
if (del && ri == del) if (del && ri == del)
continue; continue;
if (!rinew && first) { if (!rinew && first)
#if defined(AGGREGATE_NEXTHOP_CHECK)
nexthop = ri->attr->nexthop;
med = ri->attr->med;
#endif
first = 0; first = 0;
}
#ifdef AGGREGATE_NEXTHOP_CHECK
if (!IPV4_ADDR_SAME(&ri->attr->nexthop,
&nexthop)
|| ri->attr->med != med) {
if (aspath)
aspath_free(aspath);
if (community)
community_free(community);
bgp_unlock_node(rn);
bgp_unlock_node(top);
return;
}
#endif /* AGGREGATE_NEXTHOP_CHECK */
if (ri->attr->flag if (ri->attr->flag
& ATTR_FLAG_BIT(BGP_ATTR_ATOMIC_AGGREGATE)) & ATTR_FLAG_BIT(BGP_ATTR_ATOMIC_AGGREGATE))