From b3091c2e00bf00717aa0b77cddf5ab12af187105 Mon Sep 17 00:00:00 2001 From: Ashwini Reddy Date: Mon, 16 Sep 2024 14:14:50 -0700 Subject: [PATCH] bgpd: Fix the cmd warning with correct 'return' value Changes: - when command is executed by user with !json and brief arg return CMD_WARNING Ticket: #4080566 Signed-off-by: Ashwini Reddy --- bgpd/bgp_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index a43eaf00d0a4..3006d11ca12c 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -11234,7 +11234,7 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, afi_t afi, safi_t sa if (brief && !use_json) { vty_out(vty, "Brief cmd must be used only with json\n"); - return CMD_SUCCESS; + return CMD_WARNING; } if (output_cum && *output_cum != 0)