diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-05-28 07:18:36 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-05-28 07:37:25 -0400 |
| commit | 06504bea79e9b054dffb56374cc42054180e24c1 (patch) | |
| tree | b2b0b5ac4105c42e25a9ea0bedde433eb776210a /pimd/pim_cmd_common.c | |
| parent | 131153ea22aa3de94e36b2caf06d45068b0393de (diff) | |
pimd: When doing json output do not output non-json strings
When entering some show commands that use json in pimd
when the interface cannot be found do not output non-json
format in that case.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pimd/pim_cmd_common.c')
| -rw-r--r-- | pimd/pim_cmd_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pimd/pim_cmd_common.c b/pimd/pim_cmd_common.c index 75df09ec35..5b905a9536 100644 --- a/pimd/pim_cmd_common.c +++ b/pimd/pim_cmd_common.c @@ -2747,7 +2747,7 @@ void pim_show_interfaces_single(struct pim_instance *pim, struct vty *vty, } } - if (!found_ifname) + if (!found_ifname && !json) vty_out(vty, "%% No such interface\n"); } @@ -3200,7 +3200,7 @@ void pim_show_neighbors_single(struct pim_instance *pim, struct vty *vty, } } - if (!found_neighbor) + if (!found_neighbor && !json) vty_out(vty, "%% No such interface or neighbor\n"); } |
