diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 02:47:21 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 02:47:21 +0200 |
commit | 42f7e184884424f903c589f2c3d34613df558073 (patch) | |
tree | 1f887ccc9339aae79e5d3701df251f8785b92f77 /bgpd/bgp_route.c | |
parent | BGP OutQ counters sometimes display very high values (diff) | |
download | frr-42f7e184884424f903c589f2c3d34613df558073.tar.xz frr-42f7e184884424f903c589f2c3d34613df558073.zip |
atomic-aggregate is lost when we aggregate another aggregate that has atomic-aggregate
Diffstat (limited to '')
-rw-r--r-- | bgpd/bgp_route.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 4638d7512..5e8eec392 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -4819,6 +4819,7 @@ bgp_aggregate_route (struct bgp *bgp, struct prefix *p, struct bgp_info *rinew, struct bgp_info *new; int first = 1; unsigned long match = 0; + u_char atomic_aggregate = 0; /* Record adding route's nexthop and med. */ if (rinew) @@ -4874,6 +4875,9 @@ bgp_aggregate_route (struct bgp *bgp, struct prefix *p, struct bgp_info *rinew, } #endif /* AGGREGATE_NEXTHOP_CHECK */ + if (ri->attr->flag & ATTR_FLAG_BIT(BGP_ATTR_ATOMIC_AGGREGATE)) + atomic_aggregate = 1; + if (ri->sub_type != BGP_ROUTE_AGGREGATE) { if (aggregate->summary_only) @@ -4960,7 +4964,8 @@ bgp_aggregate_route (struct bgp *bgp, struct prefix *p, struct bgp_info *rinew, rn = bgp_node_get (table, p); new = info_make(ZEBRA_ROUTE_BGP, BGP_ROUTE_AGGREGATE, bgp->peer_self, bgp_attr_aggregate_intern(bgp, origin, aspath, community, - aggregate->as_set), rn); + aggregate->as_set, + atomic_aggregate), rn); SET_FLAG (new->flags, BGP_INFO_VALID); bgp_info_add (rn, new); @@ -5065,6 +5070,7 @@ bgp_aggregate_add (struct bgp *bgp, struct prefix *p, afi_t afi, safi_t safi, struct aspath *asmerge = NULL; struct community *community = NULL; struct community *commerge = NULL; + u_char atomic_aggregate = 0; table = bgp->rib[afi][safi]; @@ -5086,6 +5092,9 @@ bgp_aggregate_add (struct bgp *bgp, struct prefix *p, afi_t afi, safi_t safi, if (BGP_INFO_HOLDDOWN (ri)) continue; + if (ri->attr->flag & ATTR_FLAG_BIT(BGP_ATTR_ATOMIC_AGGREGATE)) + atomic_aggregate = 1; + if (ri->sub_type != BGP_ROUTE_AGGREGATE) { /* summary-only aggregate route suppress aggregated @@ -5141,7 +5150,8 @@ bgp_aggregate_add (struct bgp *bgp, struct prefix *p, afi_t afi, safi_t safi, rn = bgp_node_get (table, p); new = info_make(ZEBRA_ROUTE_BGP, BGP_ROUTE_AGGREGATE, bgp->peer_self, bgp_attr_aggregate_intern(bgp, origin, aspath, community, - aggregate->as_set), rn); + aggregate->as_set, + atomic_aggregate), rn); SET_FLAG (new->flags, BGP_INFO_VALID); bgp_info_add (rn, new); |