Commit 8f25e591 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Add force argument to send_unfeasible_request.

parent 95532da8
...@@ -424,13 +424,13 @@ update_route(const unsigned char *a, const unsigned char *p, unsigned char plen, ...@@ -424,13 +424,13 @@ update_route(const unsigned char *a, const unsigned char *p, unsigned char plen,
if(feasible) if(feasible)
route_changed(route, oldsrc, oldmetric); route_changed(route, oldsrc, oldmetric);
else else
send_unfeasible_request(neigh, seqno, metric, a, p, plen); send_unfeasible_request(neigh, 0, seqno, metric, a, p, plen);
if(lost) if(lost)
route_lost(oldsrc, oldmetric); route_lost(oldsrc, oldmetric);
} else { } else {
if(!feasible) { if(!feasible) {
send_unfeasible_request(neigh, seqno, metric, a, p, plen); send_unfeasible_request(neigh, 0, seqno, metric, a, p, plen);
return NULL; return NULL;
} }
if(refmetric >= INFINITY) if(refmetric >= INFINITY)
...@@ -460,7 +460,7 @@ update_route(const unsigned char *a, const unsigned char *p, unsigned char plen, ...@@ -460,7 +460,7 @@ update_route(const unsigned char *a, const unsigned char *p, unsigned char plen,
/* We just received an unfeasible update. If it's any good, send /* We just received an unfeasible update. If it's any good, send
a request for a new seqno. */ a request for a new seqno. */
void void
send_unfeasible_request(struct neighbour *neigh, send_unfeasible_request(struct neighbour *neigh, int force,
unsigned short seqno, unsigned short metric, unsigned short seqno, unsigned short metric,
const unsigned char *a, const unsigned char *a,
const unsigned char *prefix, unsigned char plen) const unsigned char *prefix, unsigned char plen)
...@@ -476,7 +476,7 @@ send_unfeasible_request(struct neighbour *neigh, ...@@ -476,7 +476,7 @@ send_unfeasible_request(struct neighbour *neigh,
return; return;
} }
if(!route || route->metric >= metric + 256) { if(force || !route || route->metric >= metric + 256) {
send_request_resend(neigh, prefix, plen, send_request_resend(neigh, prefix, plen,
src->metric >= INFINITY ? src->metric >= INFINITY ?
src->seqno : seqno_plus(src->seqno, 1), src->seqno : seqno_plus(src->seqno, 1),
......
...@@ -64,7 +64,7 @@ struct route *update_route(const unsigned char *a, ...@@ -64,7 +64,7 @@ struct route *update_route(const unsigned char *a,
unsigned short seqno, unsigned short refmetric, unsigned short seqno, unsigned short refmetric,
struct neighbour *neigh, struct neighbour *neigh,
const unsigned char *nexthop); const unsigned char *nexthop);
void send_unfeasible_request(struct neighbour *neigh, void send_unfeasible_request(struct neighbour *neigh, int force,
unsigned short seqno, unsigned short metric, unsigned short seqno, unsigned short metric,
const unsigned char *a, const unsigned char *a,
const unsigned char *prefix, unsigned char plen); const unsigned char *prefix, unsigned char plen);
......
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