diff options
author | Don Slice <dslice@nvidia.com> | 2021-05-03 20:59:01 +0200 |
---|---|---|
committer | Don Slice <dslice@nvidia.com> | 2021-05-05 14:11:27 +0200 |
commit | bb4b6eb54714cb8c93bb63a84bd3bccfae87a10a (patch) | |
tree | a4bc16139b90787442852b2434944b1d66ba5945 /pimd/pim_vty.c | |
parent | Merge pull request #8545 from opensourcerouting/assert-our-own (diff) | |
download | frr-bb4b6eb54714cb8c93bb63a84bd3bccfae87a10a.tar.xz frr-bb4b6eb54714cb8c93bb63a84bd3bccfae87a10a.zip |
pimd: stop displaying global parameters in each vrf
Problem reported that when certain pim commands were entered, they
showed up duplicated in the configuration both under default instance
and every vrf (whether pim was used there or not.) This was because
these particular parameters are global only and the function doing
the display would repeat for each vrf. This fix only displays those
in the default case (and removes them from the help for entering
under a vrf.)
Signed-off-by: Don Slice <dslice@nvidia.com>
Diffstat (limited to 'pimd/pim_vty.c')
-rw-r--r-- | pimd/pim_vty.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c index 57a0c6916..8154feb0f 100644 --- a/pimd/pim_vty.c +++ b/pimd/pim_vty.c @@ -185,16 +185,24 @@ int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty) writes += pim_rp_config_write(pim, vty, spaces); - if (router->register_suppress_time - != PIM_REGISTER_SUPPRESSION_TIME_DEFAULT) { - vty_out(vty, "%sip pim register-suppress-time %d\n", spaces, - router->register_suppress_time); - ++writes; - } - if (router->t_periodic != PIM_DEFAULT_T_PERIODIC) { - vty_out(vty, "%sip pim join-prune-interval %d\n", spaces, - router->t_periodic); - ++writes; + if (pim->vrf_id == VRF_DEFAULT) { + if (router->register_suppress_time + != PIM_REGISTER_SUPPRESSION_TIME_DEFAULT) { + vty_out(vty, "%sip pim register-suppress-time %d\n", + spaces, router->register_suppress_time); + ++writes; + } + if (router->t_periodic != PIM_DEFAULT_T_PERIODIC) { + vty_out(vty, "%sip pim join-prune-interval %d\n", + spaces, router->t_periodic); + ++writes; + } + + if (router->packet_process != PIM_DEFAULT_PACKET_PROCESS) { + vty_out(vty, "%sip pim packets %d\n", spaces, + router->packet_process); + ++writes; + } } if (pim->keep_alive_time != PIM_KEEPALIVE_PERIOD) { vty_out(vty, "%sip pim keep-alive-timer %d\n", spaces, @@ -206,11 +214,6 @@ int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty) pim->rp_keep_alive_time); ++writes; } - if (router->packet_process != PIM_DEFAULT_PACKET_PROCESS) { - vty_out(vty, "%sip pim packets %d\n", spaces, - router->packet_process); - ++writes; - } if (ssm->plist_name) { vty_out(vty, "%sip pim ssm prefix-list %s\n", spaces, ssm->plist_name); |