From 276165a9ea65fbee1fc8d12d4e37680088b8e758 Mon Sep 17 00:00:00 2001 From: vdhingra Date: Thu, 19 Nov 2020 04:46:39 -0800 Subject: [PATCH] bgpd: sh running config is not considering values provided via -e for 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 --- bgpd/bgp_vty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index d260ac3482..8e13f752a7 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -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, -- 2.39.5