Commit 928454f5 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Expire Hello history immediately if interval is uninitialised.

This fixes the case where a neighbour only sends unscheduled Hellos.
parent d66ea394
......@@ -131,12 +131,13 @@ update_neighbour(struct neighbour *neigh, struct hello_history *hist,
int rc = 0;
if(hello < 0) {
if(hist->interval <= 0)
return rc;
if(hist->interval > 0)
missed_hellos =
((int)timeval_minus_msec(&now, &hist->time) -
hist->interval * 7) /
(hist->interval * 10);
else
missed_hellos = 16; /* infinity */
if(missed_hellos <= 0)
return rc;
timeval_add_msec(&hist->time, &hist->time,
......
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