Commit a9ced573 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Be slightly less agressive about sending requests in route_lost.

parent 16e1a45e
...@@ -964,12 +964,16 @@ route_lost(struct source *src, unsigned oldmetric) ...@@ -964,12 +964,16 @@ route_lost(struct source *src, unsigned oldmetric)
if(new_route) { if(new_route) {
consider_route(new_route); consider_route(new_route);
} else if(oldmetric < INFINITY) { } else if(oldmetric < INFINITY) {
/* Complain loudly. */ /* Avoid creating a blackhole. */
send_update_resend(NULL, src->prefix, src->plen); send_update_resend(NULL, src->prefix, src->plen);
send_request_resend(NULL, src->prefix, src->plen, /* If the route was usable enough, try to get an alternate one.
src->metric >= INFINITY ? If it was not, we could be dealing with oscillations around
src->seqno : seqno_plus(src->seqno, 1), the value of INFINITY. */
src->id); if(oldmetric <= INFINITY / 2)
send_request_resend(NULL, src->prefix, src->plen,
src->metric >= INFINITY ?
src->seqno : seqno_plus(src->seqno, 1),
src->id);
} }
} }
......
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