diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-06-20 18:03:06 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-07 13:53:42 +0100 |
commit | b32d557a6eca10c1e1dc2f2ab83e201f53d134b4 (patch) | |
tree | 2cb47dd9aca4d52ebafce84826da2903e43ca6b2 /proto/ospf/neighbor.c | |
parent | ee528fbd5dc482ceece52832d4a8ea5a08251bfa (diff) |
OSPF: Update to new timers
Note that recurrent timers are currently limited to ~1 hour.
Diffstat (limited to 'proto/ospf/neighbor.c')
-rw-r--r-- | proto/ospf/neighbor.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c index 74ea63d0..12eb9e84 100644 --- a/proto/ospf/neighbor.c +++ b/proto/ospf/neighbor.c @@ -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: |