summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_updgrp_adv.c
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2015-11-10 16:29:12 +0100
committerDaniel Walton <dwalton@cumulusnetworks.com>2015-11-10 16:29:12 +0100
commit2a3d57318c315aca75d54f93037e2fe52de30569 (patch)
tree2573b389faf240771837f3fc9fa5e006471c2696 /bgpd/bgp_updgrp_adv.c
parentMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga in... (diff)
downloadfrr-2a3d57318c315aca75d54f93037e2fe52de30569.tar.xz
frr-2a3d57318c315aca75d54f93037e2fe52de30569.zip
BGP: route-server will now use addpath...chop the _rsclient code
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-8122 per draft-ietf-idr-ix-bgp-route-server-09: 2.3.2.2.2. BGP ADD-PATH Approach The [I-D.ietf-idr-add-paths] Internet draft proposes a different approach to multiple path propagation, by allowing a BGP speaker to forward multiple paths for the same prefix on a single BGP session. As [RFC4271] specifies that a BGP listener must implement an implicit withdraw when it receives an UPDATE message for a prefix which already exists in its Adj-RIB-In, this approach requires explicit support for the feature both on the route server and on its clients. If the ADD-PATH capability is negotiated bidirectionally between the route server and a route server client, and the route server client propagates multiple paths for the same prefix to the route server, then this could potentially cause the propagation of inactive, invalid or suboptimal paths to the route server, thereby causing loss of reachability to other route server clients. For this reason, ADD- PATH implementations on a route server should enforce send-only mode with the route server clients, which would result in negotiating receive-only mode from the client to the route server. This allows us to delete all of the following code: - All XXXX_rsclient() functions - peer->rib - BGP_TABLE_MAIN and BGP_TABLE_RSCLIENT - RMAP_IMPORT and RMAP_EXPORT
Diffstat (limited to 'bgpd/bgp_updgrp_adv.c')
-rw-r--r--bgpd/bgp_updgrp_adv.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/bgpd/bgp_updgrp_adv.c b/bgpd/bgp_updgrp_adv.c
index cc2fb8afd..eeb664357 100644
--- a/bgpd/bgp_updgrp_adv.c
+++ b/bgpd/bgp_updgrp_adv.c
@@ -578,14 +578,13 @@ subgroup_clear_table (struct update_subgroup *subgrp)
*/
void
subgroup_announce_table (struct update_subgroup *subgrp,
- struct bgp_table *table, int rsclient)
+ struct bgp_table *table)
{
struct bgp_node *rn;
struct bgp_info *ri;
struct attr attr;
struct attr_extra extra;
struct peer *peer;
- struct peer *onlypeer;
afi_t afi;
safi_t safi;
int addpath_capable;
@@ -595,19 +594,14 @@ subgroup_announce_table (struct update_subgroup *subgrp,
safi = SUBGRP_SAFI (subgrp);
addpath_capable = bgp_addpath_encode_tx (peer, afi, safi);
- onlypeer = ((SUBGRP_PCOUNT (subgrp) == 1) ?
- (SUBGRP_PFIRST (subgrp))->peer : NULL);
- if (rsclient)
- assert(onlypeer);
-
if (!table)
- table = (rsclient) ? onlypeer->rib[afi][safi] : peer->bgp->rib[afi][safi];
+ table = peer->bgp->rib[afi][safi];
if (safi != SAFI_MPLS_VPN
&& CHECK_FLAG (peer->af_flags[afi][safi], PEER_FLAG_DEFAULT_ORIGINATE))
subgroup_default_originate (subgrp, 0);
- /* It's initialized in bgp_announce_[check|check_rsclient]() */
+ /* It's initialized in bgp_announce_check() */
attr.extra = &extra;
for (rn = bgp_table_top (table); rn; rn = bgp_route_next (rn))
@@ -616,8 +610,7 @@ subgroup_announce_table (struct update_subgroup *subgrp,
if (CHECK_FLAG (ri->flags, BGP_INFO_SELECTED) ||
(addpath_capable && bgp_addpath_tx_path(peer, afi, safi, ri)))
{
- if (!rsclient
- && subgroup_announce_check (ri, subgrp, &rn->p, &attr))
+ if (subgroup_announce_check (ri, subgrp, &rn->p, &attr))
bgp_adj_out_set_subgroup (rn, subgrp, &attr, ri);
else
bgp_adj_out_unset_subgroup (rn, subgrp, 1, ri->addpath_tx_id);
@@ -650,7 +643,6 @@ subgroup_announce_route (struct update_subgroup *subgrp)
struct bgp_node *rn;
struct bgp_table *table;
struct peer *onlypeer;
- struct peer *peer;
if (update_subgroup_needs_refresh (subgrp))
{
@@ -669,17 +661,12 @@ subgroup_announce_route (struct update_subgroup *subgrp)
return;
if (SUBGRP_SAFI (subgrp) != SAFI_MPLS_VPN)
- subgroup_announce_table (subgrp, NULL, 0);
+ subgroup_announce_table (subgrp, NULL);
else
for (rn = bgp_table_top (update_subgroup_rib (subgrp)); rn;
rn = bgp_route_next (rn))
if ((table = (rn->info)) != NULL)
- subgroup_announce_table (subgrp, table, 0);
-
- peer = SUBGRP_PEER(subgrp);
- if (CHECK_FLAG(peer->af_flags[SUBGRP_AFI(subgrp)][SUBGRP_SAFI(subgrp)],
- PEER_FLAG_RSERVER_CLIENT))
- subgroup_announce_table (subgrp, NULL, 1);
+ subgroup_announce_table (subgrp, table);
}
void