diff options
author | Ondrej Filip <feela@network.cz> | 1999-06-02 16:31:13 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 1999-06-02 16:31:13 +0000 |
commit | 39369d6fbe4b3f73c8110b14623f367c8ffded50 (patch) | |
tree | b756193f4354647627bc55ce6638df4ab94d0e54 | |
parent | bae0f7dbb111e2c8fbb8a94b59de6e241020ad66 (diff) |
Fixed stupid bug with hello vs inactim timers.
-rw-r--r-- | proto/ospf/ospf.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index 8e201fef..65b76a24 100644 --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@ -82,7 +82,7 @@ ospf_hello_rx(struct ospf_hello_packet *ps, struct proto *p, if(ps->options!=ifa->options) { log("%s: Bad OSPF packet from %d received: options mismatch.", - p->name, nrid); + p->name, nrid); /* FIXME: This not good */ log("%s: Discarding",p->name); return; } @@ -115,9 +115,7 @@ ospf_hello_rx(struct ospf_hello_packet *ps, struct proto *p, n->bdr=ntohl(ps->bdr); n->priority=ps->priority; n->options=ps->options; - tm_start(ifa->hello_timer,ifa->deadc*ifa->helloint); - - /* XXXX */ + tm_start(n->inactim,ifa->deadc*ifa->helloint); switch(ifa->state) { @@ -467,12 +465,12 @@ ospf_add_timers(struct ospf_iface *ifa, pool *pool, int wait) /* Add hello timer */ ifa->hello_timer=tm_new(pool); ifa->hello_timer->data=ifa; - ifa->hello_timer->randomize=1; + ifa->hello_timer->randomize=0; if(ifa->helloint==0) ifa->helloint=HELLOINT_D; ifa->hello_timer->hook=hello_timer_hook; ifa->hello_timer->recurrent=ifa->helloint; tm_start(ifa->hello_timer,ifa->helloint); - DBG("%s: Installing hello timer.\n", p->name); + DBG("%s: Installing hello timer. (%d)\n", p->name, ifa->helloint); if((ifa->type!=OSPF_IT_PTP)) { /* Install wait timer on NOT-PtP interfaces */ @@ -483,8 +481,7 @@ ospf_add_timers(struct ospf_iface *ifa, pool *pool, int wait) ifa->wait_timer->recurrent=0; ifa->state=OSPF_IS_WAITING; tm_start(ifa->wait_timer,(wait!=0 ? wait : WAIT_DMH*ifa->helloint)); - DBG(p->name); - DBG(": Installing wait timer.\n"); + DBG("%s: Installing wait timer. (%d)\n", p->name, (wait!=0 ? wait : WAIT_DMH*ifa->helloint)); } else ifa->state=OSPF_IS_PTP; } |