summaryrefslogtreecommitdiff
path: root/proto/rip/rip.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2013-02-21 00:44:59 +0100
committerOndrej Filip <feela@network.cz>2013-02-21 00:44:59 +0100
commit2bf59bf4d3e4fcaff489d3445134e5e2e2af9cf6 (patch)
treec6c29257c75250f534c70763645e88dfe1a8df2a /proto/rip/rip.c
parent9d969be5f2d867704e82bd7d6c8049623d50708f (diff)
Hotfix to solve an issue with delaying timers reported by Aleksey Chudov.
Diffstat (limited to 'proto/rip/rip.c')
-rw-r--r--proto/rip/rip.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c
index 281296a5..4b303305 100644
--- a/proto/rip/rip.c
+++ b/proto/rip/rip.c
@@ -596,8 +596,12 @@ rip_start(struct proto *p)
init_list( &P->interfaces );
P->timer = tm_new( p->pool );
P->timer->data = p;
- P->timer->randomize = 5;
- P->timer->recurrent = (P_CF->period / 6)+1;
+ P->timer->randomize = 2;
+ P->timer->recurrent = (P_CF->period / 6) - 1;
+ if (P_CF->period < 12) {
+ log(L_WARN "Period %d is too low. So I am using 12 which is the lowest possible value.", P_CF->period);
+ P->timer->recurrent = 1;
+ }
P->timer->hook = rip_timer;
tm_start( P->timer, 5 );
rif = new_iface(p, NULL, 0, NULL); /* Initialize dummy interface */
@@ -956,9 +960,11 @@ rip_rte_insert(net *net UNUSED, rte *rte)
static void
rip_rte_remove(net *net UNUSED, rte *rte)
{
- // struct proto *p = rte->attrs->proto;
+#ifdef LOCAL_DEBUG
+ struct proto *p = rte->attrs->proto;
CHK_MAGIC;
DBG( "rip_rte_remove: %p\n", rte );
+#endif
rem_node( &rte->u.rip.garbage );
}