Skip to content

Commit bc2abbb

Browse files
authored
Merge pull request FRRouting#18772 from sougata-github-nvidia/bfd-peer-counter-missing-mydiscr
bfdd: Adding my discriminator id in show bfd peers counters json
2 parents 9a109a6 + 41d0ec6 commit bc2abbb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

bfdd/bfdd_vty.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ static void _display_peer_counter(struct vty *vty, struct bfd_session *bs)
529529
zlog_debug("%s: failed to update BFD session counters (%s)",
530530
__func__, bs_to_string(bs));
531531

532+
vty_out(vty, "\t\tID: %u\n", bs->discrs.my_discr);
532533
vty_out(vty, "\t\tControl packet input: %" PRIu64 " packets\n",
533534
bs->stats.rx_ctrl_pkt);
534535
vty_out(vty, "\t\tControl packet output: %" PRIu64 " packets\n",
@@ -556,6 +557,7 @@ static struct json_object *__display_peer_counters_json(struct bfd_session *bs)
556557
zlog_debug("%s: failed to update BFD session counters (%s)",
557558
__func__, bs_to_string(bs));
558559

560+
json_object_int_add(jo, "id", bs->discrs.my_discr);
559561
json_object_int_add(jo, "control-packet-input", bs->stats.rx_ctrl_pkt);
560562
json_object_int_add(jo, "control-packet-output", bs->stats.tx_ctrl_pkt);
561563
json_object_int_add(jo, "echo-packet-input", bs->stats.rx_echo_pkt);

0 commit comments

Comments
 (0)