Commit 58673129 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Implement unscheduled Hellos.

This also removes special casing of late Hellos.
parent 435b0c6a
...@@ -134,26 +134,17 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval) ...@@ -134,26 +134,17 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval)
missed_hellos = 0; missed_hellos = 0;
rc = 1; rc = 1;
} else if(missed_hellos < 0) { } else if(missed_hellos < 0) {
if(hello_interval > neigh->hello_interval) { neigh->reach <<= -missed_hellos;
/* This neighbour has increased its hello interval, missed_hellos = 0;
and we didn't notice. */
neigh->reach <<= -missed_hellos;
missed_hellos = 0;
} else {
/* Late hello. Probably due to the link layer buffering
packets during a link outage. Ignore it, but reset
the expected seqno. */
neigh->hello_seqno = hello;
hello = -1;
missed_hellos = 0;
}
rc = 1; rc = 1;
} }
} else { } else {
missed_hellos = 0; missed_hellos = 0;
} }
neigh->hello_time = now; if(hello_interval != 0) {
neigh->hello_interval = hello_interval; neigh->hello_time = now;
neigh->hello_interval = hello_interval;
}
} }
if(missed_hellos > 0) { if(missed_hellos > 0) {
......
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