diff options
author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2018-08-13 15:26:55 +0200 |
---|---|---|
committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2018-08-14 22:52:14 +0200 |
commit | 98ef9c165c50084a96a49dff872317d45f474a2f (patch) | |
tree | 508f1ea70281dc1903c555acfa7070396e3311b3 /bfdd/bfdd_vty.c | |
parent | Merge pull request #2805 from opensourcerouting/malloc-size (diff) | |
download | frr-98ef9c165c50084a96a49dff872317d45f474a2f.tar.xz frr-98ef9c165c50084a96a49dff872317d45f474a2f.zip |
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>
Diffstat (limited to 'bfdd/bfdd_vty.c')
-rw-r--r-- | bfdd/bfdd_vty.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c index bb5f23c40..eedaec0a1 100644 --- a/bfdd/bfdd_vty.c +++ b/bfdd/bfdd_vty.c @@ -390,7 +390,7 @@ static void _display_peer(struct vty *vty, struct bfd_session *bs) vty_out(vty, "down\n"); 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); break; case PTM_BFD_INIT: @@ -475,7 +475,7 @@ static struct json_object *__display_peer_json(struct bfd_session *bs) case PTM_BFD_DOWN: json_object_string_add(jo, "status", "down"); json_object_int_add(jo, "downtime", - monotime(NULL) - bs->uptime.tv_sec); + monotime(NULL) - bs->downtime.tv_sec); break; case PTM_BFD_INIT: json_object_string_add(jo, "status", "init"); |