diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-12-08 14:42:36 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-12-08 19:06:33 +0100 |
commit | d5b77cc20d60238aea03c600e912b99022ea06dd (patch) | |
tree | 2fbfb156eb1728281b5d5a2879d07ea4239a7115 /bgpd | |
parent | build: Make MULTIPATH_NUM a config.h value (diff) | |
download | frr-d5b77cc20d60238aea03c600e912b99022ea06dd.tar.xz frr-d5b77cc20d60238aea03c600e912b99022ea06dd.zip |
bgpd: Use actual MULTIPATH_NUM as the limitor
BGP uses a second #define that is equal to MULTIPATH_NUM. There
is no point in having a different #define. Just consolidate.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_mpath.c | 6 | ||||
-rw-r--r-- | bgpd/bgp_mpath.h | 3 | ||||
-rw-r--r-- | bgpd/bgp_vty.c | 4 | ||||
-rw-r--r-- | bgpd/bgpd.c | 4 |
4 files changed, 7 insertions, 10 deletions
diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c index cf92bb151..496ccdf11 100644 --- a/bgpd/bgp_mpath.c +++ b/bgpd/bgp_mpath.c @@ -83,11 +83,11 @@ bgp_maximum_paths_unset (struct bgp *bgp, afi_t afi, safi_t safi, switch (peertype) { case BGP_PEER_IBGP: - bgp->maxpaths[afi][safi].maxpaths_ibgp = BGP_DEFAULT_MAXPATHS; + bgp->maxpaths[afi][safi].maxpaths_ibgp = MULTIPATH_NUM; bgp->maxpaths[afi][safi].ibgp_flags = 0; break; case BGP_PEER_EBGP: - bgp->maxpaths[afi][safi].maxpaths_ebgp = BGP_DEFAULT_MAXPATHS; + bgp->maxpaths[afi][safi].maxpaths_ebgp = MULTIPATH_NUM; break; default: return -1; @@ -429,7 +429,7 @@ bgp_info_mpath_update (struct bgp_node *rn, struct bgp_info *new_best, char pfx_buf[PREFIX2STR_BUFFER], nh_buf[2][INET6_ADDRSTRLEN]; mpath_changed = 0; - maxpaths = BGP_DEFAULT_MAXPATHS; + maxpaths = MULTIPATH_NUM; mpath_count = 0; cur_mpath = NULL; old_mpath_count = 0; diff --git a/bgpd/bgp_mpath.h b/bgpd/bgp_mpath.h index 1e112f0ec..9120ca343 100644 --- a/bgpd/bgp_mpath.h +++ b/bgpd/bgp_mpath.h @@ -27,9 +27,6 @@ /* Limit on number of configured maxpaths */ #define BGP_MAXIMUM_MAXPATHS 255 -/* BGP default maximum-paths */ -#define BGP_DEFAULT_MAXPATHS MULTIPATH_NUM - /* Supplemental information linked to bgp_info for keeping track of * multipath selections, lazily allocated to save memory */ diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 1bde623fc..a733c8068 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -1463,14 +1463,14 @@ int bgp_config_write_maxpaths (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi, int *write) { - if (bgp->maxpaths[afi][safi].maxpaths_ebgp != BGP_DEFAULT_MAXPATHS) + if (bgp->maxpaths[afi][safi].maxpaths_ebgp != MULTIPATH_NUM) { bgp_config_write_family_header (vty, afi, safi, write); vty_out (vty, " maximum-paths %d%s", bgp->maxpaths[afi][safi].maxpaths_ebgp, VTY_NEWLINE); } - if (bgp->maxpaths[afi][safi].maxpaths_ibgp != BGP_DEFAULT_MAXPATHS) + if (bgp->maxpaths[afi][safi].maxpaths_ibgp != MULTIPATH_NUM) { bgp_config_write_family_header (vty, afi, safi, write); vty_out (vty, " maximum-paths ibgp %d", diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index ea66dc3b3..9514f4de1 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -2728,8 +2728,8 @@ bgp_create (as_t *as, const char *name) bgp->rib[afi][safi] = bgp_table_init (afi, safi); /* Enable maximum-paths */ - bgp_maximum_paths_set (bgp, afi, safi, BGP_PEER_EBGP, BGP_DEFAULT_MAXPATHS, 0); - bgp_maximum_paths_set (bgp, afi, safi, BGP_PEER_IBGP, BGP_DEFAULT_MAXPATHS, 0); + bgp_maximum_paths_set (bgp, afi, safi, BGP_PEER_EBGP, MULTIPATH_NUM, 0); + bgp_maximum_paths_set (bgp, afi, safi, BGP_PEER_IBGP, MULTIPATH_NUM, 0); } bgp->v_update_delay = BGP_UPDATE_DELAY_DEF; |