diff options
author | Donald Sharp <sharpd@nvidia.com> | 2022-09-27 15:02:26 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2022-09-27 15:02:26 +0200 |
commit | 54b7d471f34a6f2150ecae2d925263681258ced2 (patch) | |
tree | 7ac157998f5643e145e23e8868d7a69cd35616d6 | |
parent | Merge pull request #12002 from opensourcerouting/fix/add_doc_missing_bgp_impl... (diff) | |
download | frr-54b7d471f34a6f2150ecae2d925263681258ced2.tar.xz frr-54b7d471f34a6f2150ecae2d925263681258ced2.zip |
vtysh: Properly handle `[no] service cputime-stats` in config
Prevent duplicate lines from each daemon in vtysh output.
Fixes: #12022
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r-- | vtysh/vtysh_config.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index a7ec2a93c..d4628839d 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -489,7 +489,11 @@ void vtysh_config_parse_line(void *arg, const char *line) strncmp(line, "no ip prefix-list", strlen("no ip prefix-list")) == 0 || strncmp(line, "no ipv6 prefix-list", - strlen("no ipv6 prefix-list")) == 0) + strlen("no ipv6 prefix-list")) == 0 || + strncmp(line, "service cputime-stats", + strlen("service cputime-stats")) == 0 || + strncmp(line, "no service cputime-stats", + strlen("no service cputime-stats")) == 0) config_add_line_uniq(config_top, line); else config_add_line(config_top, line); |