mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
OSPF: Update to new timers
Note that recurrent timers are currently limited to ~1 hour.
This commit is contained in:
@@ -66,10 +66,10 @@ reset_lists(struct ospf_proto *p, struct ospf_neighbor *n)
|
||||
ospf_top_free(n->lsrth);
|
||||
ospf_reset_lsack_queue(n);
|
||||
|
||||
tm_stop(n->dbdes_timer);
|
||||
tm_stop(n->lsrq_timer);
|
||||
tm_stop(n->lsrt_timer);
|
||||
tm_stop(n->ackd_timer);
|
||||
tm2_stop(n->dbdes_timer);
|
||||
tm2_stop(n->lsrq_timer);
|
||||
tm2_stop(n->lsrt_timer);
|
||||
tm2_stop(n->ackd_timer);
|
||||
|
||||
init_lists(p, n);
|
||||
}
|
||||
@@ -94,11 +94,11 @@ ospf_neighbor_new(struct ospf_iface *ifa)
|
||||
init_list(&n->ackl[ACKL_DIRECT]);
|
||||
init_list(&n->ackl[ACKL_DELAY]);
|
||||
|
||||
n->inactim = tm_new_set(pool, inactivity_timer_hook, n, 0, 0);
|
||||
n->dbdes_timer = tm_new_set(pool, dbdes_timer_hook, n, 0, ifa->rxmtint);
|
||||
n->lsrq_timer = tm_new_set(pool, lsrq_timer_hook, n, 0, ifa->rxmtint);
|
||||
n->lsrt_timer = tm_new_set(pool, lsrt_timer_hook, n, 0, ifa->rxmtint);
|
||||
n->ackd_timer = tm_new_set(pool, ackd_timer_hook, n, 0, ifa->rxmtint / 2);
|
||||
n->inactim = tm2_new_init(pool, inactivity_timer_hook, n, 0, 0);
|
||||
n->dbdes_timer = tm2_new_init(pool, dbdes_timer_hook, n, ifa->rxmtint S, 0);
|
||||
n->lsrq_timer = tm2_new_init(pool, lsrq_timer_hook, n, ifa->rxmtint S, 0);
|
||||
n->lsrt_timer = tm2_new_init(pool, lsrt_timer_hook, n, ifa->rxmtint S, 0);
|
||||
n->ackd_timer = tm2_new_init(pool, ackd_timer_hook, n, ifa->rxmtint S / 2, 0);
|
||||
|
||||
return (n);
|
||||
}
|
||||
@@ -185,8 +185,8 @@ ospf_neigh_chstate(struct ospf_neighbor *n, u8 state)
|
||||
n->dds++;
|
||||
n->myimms = DBDES_IMMS;
|
||||
|
||||
tm_start(n->dbdes_timer, 0);
|
||||
tm_start(n->ackd_timer, ifa->rxmtint / 2);
|
||||
tm2_start(n->dbdes_timer, 0);
|
||||
tm2_start(n->ackd_timer, ifa->rxmtint S / 2);
|
||||
}
|
||||
|
||||
if (state > NEIGHBOR_EXSTART)
|
||||
@@ -231,7 +231,7 @@ ospf_neigh_sm(struct ospf_neighbor *n, int event)
|
||||
ospf_neigh_chstate(n, NEIGHBOR_INIT);
|
||||
|
||||
/* Restart inactivity timer */
|
||||
tm_start(n->inactim, n->ifa->deadint);
|
||||
tm2_start(n->inactim, n->ifa->deadint S);
|
||||
break;
|
||||
|
||||
case INM_2WAYREC:
|
||||
|
Reference in New Issue
Block a user