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;
if (!ri)
return 0;
+ if (origin != ri->attr->origin)
+ return 0;
+
if (!aspath_cmp(ri->attr->aspath, (aspath) ? aspath : ae))
return 0;
* 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)