mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 07:15:33 +00:00
Merge pull request #7181 from volta-networks/fix_isis_timer_oflow
isisd: minor fixes and improvements
This commit is contained in:
commit
d7047a49cb
@ -304,7 +304,6 @@ void isis_adj_state_change(struct isis_adjacency **padj,
|
||||
continue;
|
||||
if (new_state == ISIS_ADJ_UP) {
|
||||
circuit->upadjcount[level - 1]++;
|
||||
hook_call(isis_adj_state_change_hook, adj);
|
||||
/* update counter & timers for debugging
|
||||
* purposes */
|
||||
adj->last_flap = time(NULL);
|
||||
@ -317,7 +316,6 @@ void isis_adj_state_change(struct isis_adjacency **padj,
|
||||
if (circuit->upadjcount[level - 1] == 0)
|
||||
isis_tx_queue_clean(circuit->tx_queue);
|
||||
|
||||
hook_call(isis_adj_state_change_hook, adj);
|
||||
if (new_state == ISIS_ADJ_DOWN)
|
||||
del = true;
|
||||
}
|
||||
@ -342,7 +340,6 @@ void isis_adj_state_change(struct isis_adjacency **padj,
|
||||
continue;
|
||||
if (new_state == ISIS_ADJ_UP) {
|
||||
circuit->upadjcount[level - 1]++;
|
||||
hook_call(isis_adj_state_change_hook, adj);
|
||||
|
||||
/* update counter & timers for debugging
|
||||
* purposes */
|
||||
@ -365,13 +362,14 @@ void isis_adj_state_change(struct isis_adjacency **padj,
|
||||
if (circuit->upadjcount[level - 1] == 0)
|
||||
isis_tx_queue_clean(circuit->tx_queue);
|
||||
|
||||
hook_call(isis_adj_state_change_hook, adj);
|
||||
if (new_state == ISIS_ADJ_DOWN)
|
||||
del = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hook_call(isis_adj_state_change_hook, adj);
|
||||
|
||||
if (del) {
|
||||
isis_delete_adj(adj);
|
||||
*padj = NULL;
|
||||
@ -467,11 +465,15 @@ void isis_adj_print_vty(struct isis_adjacency *adj, struct vty *vty,
|
||||
vty_out(vty, "%-3u", adj->level); /* level */
|
||||
vty_out(vty, "%-13s", adj_state2string(adj->adj_state));
|
||||
now = time(NULL);
|
||||
if (adj->last_upd)
|
||||
vty_out(vty, "%-9llu",
|
||||
(unsigned long long)adj->last_upd
|
||||
+ adj->hold_time - now);
|
||||
else
|
||||
if (adj->last_upd) {
|
||||
if (adj->last_upd + adj->hold_time
|
||||
< (unsigned long long)now)
|
||||
vty_out(vty, " Expiring");
|
||||
else
|
||||
vty_out(vty, " %-9llu",
|
||||
(unsigned long long)adj->last_upd
|
||||
+ adj->hold_time - now);
|
||||
} else
|
||||
vty_out(vty, "- ");
|
||||
vty_out(vty, "%-10s", snpa_print(adj->snpa));
|
||||
vty_out(vty, "\n");
|
||||
@ -491,11 +493,15 @@ void isis_adj_print_vty(struct isis_adjacency *adj, struct vty *vty,
|
||||
vty_out(vty, ", Level: %u", adj->level); /* level */
|
||||
vty_out(vty, ", State: %s", adj_state2string(adj->adj_state));
|
||||
now = time(NULL);
|
||||
if (adj->last_upd)
|
||||
vty_out(vty, ", Expires in %s",
|
||||
time2string(adj->last_upd + adj->hold_time
|
||||
- now));
|
||||
else
|
||||
if (adj->last_upd) {
|
||||
if (adj->last_upd + adj->hold_time
|
||||
< (unsigned long long)now)
|
||||
vty_out(vty, " Expiring");
|
||||
else
|
||||
vty_out(vty, ", Expires in %s",
|
||||
time2string(adj->last_upd
|
||||
+ adj->hold_time - now));
|
||||
} else
|
||||
vty_out(vty, ", Expires in %s",
|
||||
time2string(adj->hold_time));
|
||||
vty_out(vty, "\n");
|
||||
|
Loading…
Reference in New Issue
Block a user