mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 09:22:03 +00:00
bfdd: fix downtime display
BFD peer status show command was using the wrong variable to display the downtime counter. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
parent
94cb1f61a4
commit
98ef9c165c
@ -390,7 +390,7 @@ static void _display_peer(struct vty *vty, struct bfd_session *bs)
|
|||||||
vty_out(vty, "down\n");
|
vty_out(vty, "down\n");
|
||||||
|
|
||||||
now = monotime(NULL);
|
now = monotime(NULL);
|
||||||
integer2timestr(now - bs->uptime.tv_sec, buf, sizeof(buf));
|
integer2timestr(now - bs->downtime.tv_sec, buf, sizeof(buf));
|
||||||
vty_out(vty, "\t\tDowntime: %s\n", buf);
|
vty_out(vty, "\t\tDowntime: %s\n", buf);
|
||||||
break;
|
break;
|
||||||
case PTM_BFD_INIT:
|
case PTM_BFD_INIT:
|
||||||
@ -475,7 +475,7 @@ static struct json_object *__display_peer_json(struct bfd_session *bs)
|
|||||||
case PTM_BFD_DOWN:
|
case PTM_BFD_DOWN:
|
||||||
json_object_string_add(jo, "status", "down");
|
json_object_string_add(jo, "status", "down");
|
||||||
json_object_int_add(jo, "downtime",
|
json_object_int_add(jo, "downtime",
|
||||||
monotime(NULL) - bs->uptime.tv_sec);
|
monotime(NULL) - bs->downtime.tv_sec);
|
||||||
break;
|
break;
|
||||||
case PTM_BFD_INIT:
|
case PTM_BFD_INIT:
|
||||||
json_object_string_add(jo, "status", "init");
|
json_object_string_add(jo, "status", "init");
|
||||||
|
Loading…
Reference in New Issue
Block a user