Skip to content

Commit

Permalink
Merge pull request #3002 from donaldsharp/3001_6.0
Browse files Browse the repository at this point in the history
Push 2993 into 6.0
  • Loading branch information
mwinter-osr committed Sep 11, 2018
2 parents 7cbe25a + 2172061 commit 34a2320
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -5456,7 +5456,8 @@ static void bgp_aggregate_free(struct bgp_aggregate *aggregate)
XFREE(MTYPE_BGP_AGGREGATE, aggregate);
}

static int bgp_aggregate_info_same(struct bgp_info *ri, struct aspath *aspath,
static int bgp_aggregate_info_same(struct bgp_info *ri, uint8_t origin,
struct aspath *aspath,
struct community *comm)
{
static struct aspath *ae = NULL;
Expand All @@ -5467,6 +5468,9 @@ static int bgp_aggregate_info_same(struct bgp_info *ri, struct aspath *aspath,
if (!ri)
return 0;

if (origin != ri->attr->origin)
return 0;

if (!aspath_cmp(ri->attr->aspath, (aspath) ? aspath : ae))
return 0;

Expand Down Expand Up @@ -5501,7 +5505,8 @@ static void bgp_aggregate_install(struct bgp *bgp, afi_t afi, safi_t safi,
* If the aggregate information has not changed
* no need to re-install it again.
*/
if (bgp_aggregate_info_same(rn->info, aspath, community)) {
if (bgp_aggregate_info_same(rn->info, origin, aspath,
community)) {
bgp_unlock_node(rn);

if (aspath)
Expand Down

0 comments on commit 34a2320

Please sign in to comment.