Skip to content

Commit

Permalink
bgpd: sh running config is not considering values provided via -e for…
Browse files Browse the repository at this point in the history
… max-paths

problem
1. run the bgp with -e1 option
2. c t
   router bgp 100
3. show running config
    !
     address-family ipv6 multicast
      maximum-paths 1
      maximum-paths ibgp 1
     exit-address-family
    !
address families should not dump maximum-paths if there
value is same as value provided at run time.

fix
if the maxpaths_ebgp value is same as multipath_num global
object, don't dump maximum-paths.

Signed-off-by: vishaldhingra <[email protected]>
  • Loading branch information
vishaldhingra authored and idryzhov committed Nov 27, 2020
1 parent 9af291f commit 276165a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bgpd/bgp_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -2018,12 +2018,12 @@ ALIAS_HIDDEN(no_bgp_maxpaths_ibgp, no_bgp_maxpaths_ibgp_hidden_cmd,
static void bgp_config_write_maxpaths(struct vty *vty, struct bgp *bgp,
afi_t afi, safi_t safi)
{
if (bgp->maxpaths[afi][safi].maxpaths_ebgp != MULTIPATH_NUM) {
if (bgp->maxpaths[afi][safi].maxpaths_ebgp != multipath_num) {
vty_out(vty, " maximum-paths %d\n",
bgp->maxpaths[afi][safi].maxpaths_ebgp);
}

if (bgp->maxpaths[afi][safi].maxpaths_ibgp != MULTIPATH_NUM) {
if (bgp->maxpaths[afi][safi].maxpaths_ibgp != multipath_num) {
vty_out(vty, " maximum-paths ibgp %d",
bgp->maxpaths[afi][safi].maxpaths_ibgp);
if (CHECK_FLAG(bgp->maxpaths[afi][safi].ibgp_flags,
Expand Down

0 comments on commit 276165a

Please sign in to comment.