Commit c9f1e02d authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Actually resend retractions.

parent f3d04b5e
...@@ -545,7 +545,7 @@ send_triggered_update(struct route *route, struct source *oldsrc, int oldmetric) ...@@ -545,7 +545,7 @@ send_triggered_update(struct route *route, struct source *oldsrc, int oldmetric)
if(route->src != oldsrc || (oldmetric < INFINITY && newmetric >= INFINITY)) if(route->src != oldsrc || (oldmetric < INFINITY && newmetric >= INFINITY))
/* Switching sources can cause transient routing loops. /* Switching sources can cause transient routing loops.
Retractions are always urgent. */ Retractions are always urgent. */
urgent = 1; urgent = 2;
else if(newmetric >= 8 * 256 && oldmetric >= 8 * 256) else if(newmetric >= 8 * 256 && oldmetric >= 8 * 256)
/* Don't be noisy about far-away nodes */ /* Don't be noisy about far-away nodes */
urgent = -1; urgent = -1;
...@@ -555,14 +555,18 @@ send_triggered_update(struct route *route, struct source *oldsrc, int oldmetric) ...@@ -555,14 +555,18 @@ send_triggered_update(struct route *route, struct source *oldsrc, int oldmetric)
/* Make sure that requests are satisfied speedily */ /* Make sure that requests are satisfied speedily */
if(unsatisfied_request(route->src->prefix, route->src->plen, if(unsatisfied_request(route->src->prefix, route->src->plen,
route->seqno, hash_id(route->src->id))) route->seqno, hash_id(route->src->id)))
urgent = 1; urgent = MAX(urgent, 1);
if(urgent < 0) if(urgent < 0)
return; return;
if(urgent || if(urgent ||
(newmetric >= oldmetric + 256 || oldmetric >= newmetric + 256)) (newmetric >= oldmetric + 256 || oldmetric >= newmetric + 256)) {
send_update(NULL, urgent, route->src->prefix, route->src->plen); if(urgent >= 2)
send_update_resend(NULL, route->src->prefix, route->src->plen);
else
send_update(NULL, urgent, route->src->prefix, route->src->plen);
}
if(oldmetric < INFINITY) { if(oldmetric < INFINITY) {
if(newmetric >= INFINITY || newmetric >= oldmetric + 384) { if(newmetric >= INFINITY || newmetric >= oldmetric + 384) {
...@@ -612,7 +616,7 @@ route_lost(struct source *src, int oldmetric) ...@@ -612,7 +616,7 @@ route_lost(struct source *src, int oldmetric)
consider_route(new_route); consider_route(new_route);
} else { } else {
/* Complain loudly. */ /* Complain loudly. */
send_update(NULL, 1, src->prefix, src->plen); send_update_resend(NULL, src->prefix, src->plen);
if(oldmetric < INFINITY) if(oldmetric < INFINITY)
send_request_resend(NULL, src->prefix, src->plen, send_request_resend(NULL, src->prefix, src->plen,
src->metric >= INFINITY ? src->metric >= INFINITY ?
......
...@@ -159,7 +159,7 @@ check_xroutes(int send_updates) ...@@ -159,7 +159,7 @@ check_xroutes(int send_updates)
if(!export) { if(!export) {
if(send_updates) if(send_updates)
send_update(NULL, 1, xroutes[i].prefix, xroutes[i].plen); send_update_resend(NULL, xroutes[i].prefix, xroutes[i].plen);
flush_xroute(&xroutes[i]); flush_xroute(&xroutes[i]);
change = 1; change = 1;
} else { } else {
......
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