mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 10:04:18 +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;
|
continue;
|
||||||
if (new_state == ISIS_ADJ_UP) {
|
if (new_state == ISIS_ADJ_UP) {
|
||||||
circuit->upadjcount[level - 1]++;
|
circuit->upadjcount[level - 1]++;
|
||||||
hook_call(isis_adj_state_change_hook, adj);
|
|
||||||
/* update counter & timers for debugging
|
/* update counter & timers for debugging
|
||||||
* purposes */
|
* purposes */
|
||||||
adj->last_flap = time(NULL);
|
adj->last_flap = time(NULL);
|
||||||
@ -317,7 +316,6 @@ void isis_adj_state_change(struct isis_adjacency **padj,
|
|||||||
if (circuit->upadjcount[level - 1] == 0)
|
if (circuit->upadjcount[level - 1] == 0)
|
||||||
isis_tx_queue_clean(circuit->tx_queue);
|
isis_tx_queue_clean(circuit->tx_queue);
|
||||||
|
|
||||||
hook_call(isis_adj_state_change_hook, adj);
|
|
||||||
if (new_state == ISIS_ADJ_DOWN)
|
if (new_state == ISIS_ADJ_DOWN)
|
||||||
del = true;
|
del = true;
|
||||||
}
|
}
|
||||||
@ -342,7 +340,6 @@ void isis_adj_state_change(struct isis_adjacency **padj,
|
|||||||
continue;
|
continue;
|
||||||
if (new_state == ISIS_ADJ_UP) {
|
if (new_state == ISIS_ADJ_UP) {
|
||||||
circuit->upadjcount[level - 1]++;
|
circuit->upadjcount[level - 1]++;
|
||||||
hook_call(isis_adj_state_change_hook, adj);
|
|
||||||
|
|
||||||
/* update counter & timers for debugging
|
/* update counter & timers for debugging
|
||||||
* purposes */
|
* purposes */
|
||||||
@ -365,13 +362,14 @@ void isis_adj_state_change(struct isis_adjacency **padj,
|
|||||||
if (circuit->upadjcount[level - 1] == 0)
|
if (circuit->upadjcount[level - 1] == 0)
|
||||||
isis_tx_queue_clean(circuit->tx_queue);
|
isis_tx_queue_clean(circuit->tx_queue);
|
||||||
|
|
||||||
hook_call(isis_adj_state_change_hook, adj);
|
|
||||||
if (new_state == ISIS_ADJ_DOWN)
|
if (new_state == ISIS_ADJ_DOWN)
|
||||||
del = true;
|
del = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hook_call(isis_adj_state_change_hook, adj);
|
||||||
|
|
||||||
if (del) {
|
if (del) {
|
||||||
isis_delete_adj(adj);
|
isis_delete_adj(adj);
|
||||||
*padj = NULL;
|
*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, "%-3u", adj->level); /* level */
|
||||||
vty_out(vty, "%-13s", adj_state2string(adj->adj_state));
|
vty_out(vty, "%-13s", adj_state2string(adj->adj_state));
|
||||||
now = time(NULL);
|
now = time(NULL);
|
||||||
if (adj->last_upd)
|
if (adj->last_upd) {
|
||||||
vty_out(vty, "%-9llu",
|
if (adj->last_upd + adj->hold_time
|
||||||
(unsigned long long)adj->last_upd
|
< (unsigned long long)now)
|
||||||
+ adj->hold_time - now);
|
vty_out(vty, " Expiring");
|
||||||
else
|
else
|
||||||
|
vty_out(vty, " %-9llu",
|
||||||
|
(unsigned long long)adj->last_upd
|
||||||
|
+ adj->hold_time - now);
|
||||||
|
} else
|
||||||
vty_out(vty, "- ");
|
vty_out(vty, "- ");
|
||||||
vty_out(vty, "%-10s", snpa_print(adj->snpa));
|
vty_out(vty, "%-10s", snpa_print(adj->snpa));
|
||||||
vty_out(vty, "\n");
|
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, ", Level: %u", adj->level); /* level */
|
||||||
vty_out(vty, ", State: %s", adj_state2string(adj->adj_state));
|
vty_out(vty, ", State: %s", adj_state2string(adj->adj_state));
|
||||||
now = time(NULL);
|
now = time(NULL);
|
||||||
if (adj->last_upd)
|
if (adj->last_upd) {
|
||||||
vty_out(vty, ", Expires in %s",
|
if (adj->last_upd + adj->hold_time
|
||||||
time2string(adj->last_upd + adj->hold_time
|
< (unsigned long long)now)
|
||||||
- now));
|
vty_out(vty, " Expiring");
|
||||||
else
|
else
|
||||||
|
vty_out(vty, ", Expires in %s",
|
||||||
|
time2string(adj->last_upd
|
||||||
|
+ adj->hold_time - now));
|
||||||
|
} else
|
||||||
vty_out(vty, ", Expires in %s",
|
vty_out(vty, ", Expires in %s",
|
||||||
time2string(adj->hold_time));
|
time2string(adj->hold_time));
|
||||||
vty_out(vty, "\n");
|
vty_out(vty, "\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user