Skip to content

Commit 872e648

Browse files
Manpreet-k0raja-rajasekar
authored andcommitted
bgpd: adding flog_err for long cli
Adding flog_err to log the error when the cli entered by user exceeds 8k limit Testing: Logging below error for long cli string: 2024-10-22T05:18:02.991041+00:00 leaf22 bgpd[416151]: [VRACB-29FDG] [EC 100663304] Command too long: 6402:429496616 429496402:429496402:429496617 429496402:429496402:429496618 429496402:429496402:429496619 429496402:429496402:429496620 429496402:429496402:429496621 Ticket: #4127865 Signed-off-by: Manpreet Kaur <[email protected]>
1 parent e4c8c2b commit 872e648

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/vty.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2423,6 +2423,7 @@ static void vtysh_read(struct event *event)
24232423
/* Clear command line buffer. */
24242424
vty->cp = vty->length = 0;
24252425
vty_clear_buf(vty);
2426+
flog_err(EC_LIB_VTY, "Command too long: %.*s", nbytes, buf);
24262427
vty_out(vty, "%% Command is too long.\n");
24272428
} else {
24282429
for (p = buf; p < buf + nbytes; p++) {

0 commit comments

Comments
 (0)