Commit 38f3c444 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Clarify time computation in send_request_resend.

parent 8d9cbd6c
...@@ -517,17 +517,20 @@ send_request_resend(struct neighbour *neigh, ...@@ -517,17 +517,20 @@ send_request_resend(struct neighbour *neigh,
const unsigned char *prefix, unsigned char plen, const unsigned char *prefix, unsigned char plen,
unsigned short seqno, unsigned short router_hash) unsigned short seqno, unsigned short router_hash)
{ {
int time;
if(neigh) if(neigh)
send_unicast_request(neigh, prefix, plen, 127, seqno, router_hash); send_unicast_request(neigh, prefix, plen, 127, seqno, router_hash);
else else
send_request(NULL, prefix, plen, 127, seqno, router_hash); send_request(NULL, prefix, plen, 127, seqno, router_hash);
time = 2000;
time = MIN(time, wireless_hello_interval / 2);
time = MIN(time, wired_hello_interval / 2);
time = MAX(time, 10);
record_request(prefix, plen, seqno, router_hash, record_request(prefix, plen, seqno, router_hash,
neigh ? neigh->network : NULL, neigh ? neigh->network : NULL, time);
MAX(10,
MIN(wireless_hello_interval / 2,
MIN(wired_hello_interval / 2,
2000))));
} }
static void static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment