Fixes output of BGP timers in 'show protocols all'.
This commit is contained in:
parent
d8b5a786d2
commit
35f8c731ea
1 changed files with 7 additions and 4 deletions
|
@ -1032,6 +1032,9 @@ bgp_get_status(struct proto *P, byte *buf)
|
||||||
bsprintf(buf, "%-14s%s%s", bgp_state_dsc(p), err1, err2);
|
bsprintf(buf, "%-14s%s%s", bgp_state_dsc(p), err1, err2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bird_clock_t tm_remains(timer *t)
|
||||||
|
{ return t->expires ? t->expires - now : 0; }
|
||||||
|
|
||||||
static void
|
static void
|
||||||
bgp_show_proto_info(struct proto *P)
|
bgp_show_proto_info(struct proto *P)
|
||||||
{
|
{
|
||||||
|
@ -1075,9 +1078,9 @@ bgp_show_proto_info(struct proto *P)
|
||||||
cli_msg(-1006, " Route limit: %d/%d",
|
cli_msg(-1006, " Route limit: %d/%d",
|
||||||
p->p.stats.imp_routes, p->cf->route_limit);
|
p->p.stats.imp_routes, p->cf->route_limit);
|
||||||
cli_msg(-1006, " Hold timer: %d/%d",
|
cli_msg(-1006, " Hold timer: %d/%d",
|
||||||
c->hold_timer->expires - now, c->hold_time);
|
tm_remains(c->hold_timer), c->hold_time);
|
||||||
cli_msg(-1006, " Keepalive timer: %d/%d",
|
cli_msg(-1006, " Keepalive timer: %d/%d",
|
||||||
c->keepalive_timer->expires - now, c->keepalive_time);
|
tm_remains(c->keepalive_timer), c->keepalive_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((p->last_error_class != BE_NONE) &&
|
if ((p->last_error_class != BE_NONE) &&
|
||||||
|
|
Loading…
Reference in a new issue