Commit 6b9f349b authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Send multihop requests when losing a route.

parent 4d129353
......@@ -459,9 +459,15 @@ send_triggered_update(struct route *route, struct source *oldsrc, int oldmetric)
send_update(NULL, urgent, route->src->prefix, route->src->plen);
if(oldmetric < INFINITY) {
if(newmetric >= INFINITY || newmetric >= oldmetric + 384)
if(newmetric >= INFINITY)
send_request(NULL, route->src->prefix, route->src->plen,
0, 0, 0);
else if(newmetric >= oldmetric + 384)
send_request(NULL, route->src->prefix, route->src->plen,
127,
route->src->metric >= INFINITY ?
route->src->seqno : seqno_plus(route->src->seqno, 1),
hash_id(route->src->address));
}
}
......@@ -504,7 +510,10 @@ route_lost(struct source *src, int oldmetric)
/* Complain loudly. */
send_update(NULL, 1, src->prefix, src->plen);
if(oldmetric < INFINITY)
send_request(NULL, src->prefix, src->plen, 0, 0, 0);
send_request(NULL, src->prefix, src->plen, 127,
src->metric >= INFINITY ?
src->seqno : seqno_plus(src->seqno, 1),
hash_id(src->address));
}
}
......
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