Commit 358ae9f3 authored by Matthieu Boutier's avatar Matthieu Boutier

Make send_request_resend deal with source prefixes.

parent f75b114e
......@@ -1898,15 +1898,17 @@ send_unicast_multihop_request(struct neighbour *neigh,
void
send_request_resend(struct neighbour *neigh,
const unsigned char *prefix, unsigned char plen,
const unsigned char *src_prefix, unsigned char src_plen,
unsigned short seqno, unsigned char *id)
{
if(neigh)
send_unicast_multihop_request(neigh, prefix, plen, zeroes, 0,
send_unicast_multihop_request(neigh, prefix, plen, src_prefix, src_plen,
seqno, id, 127);
else
send_multihop_request(NULL, prefix, plen, zeroes, 0, seqno, id, 127);
send_multihop_request(NULL, prefix, plen, src_prefix, src_plen,
seqno, id, 127);
record_resend(RESEND_REQUEST, prefix, plen, zeroes, 0, seqno, id,
record_resend(RESEND_REQUEST, prefix, plen, src_prefix, src_plen, seqno, id,
neigh ? neigh->ifp : NULL, resend_delay);
}
......
......@@ -104,6 +104,8 @@ send_unicast_multihop_request(struct neighbour *neigh,
unsigned short hop_count);
void send_request_resend(struct neighbour *neigh,
const unsigned char *prefix, unsigned char plen,
const unsigned char *src_prefix,
unsigned char src_plen,
unsigned short seqno, unsigned char *id);
void handle_request(struct neighbour *neigh, const unsigned char *prefix,
unsigned char plen, unsigned char hop_count,
......
......@@ -1111,6 +1111,7 @@ send_triggered_update(struct babel_route *route, struct source *oldsrc,
if(oldmetric < INFINITY) {
if(newmetric >= oldmetric + 512) {
send_request_resend(NULL, route->src->prefix, route->src->plen,
route->src->src_prefix, route->src->src_plen,
route->src->metric >= INFINITY ?
route->src->seqno :
seqno_plus(route->src->seqno, 1),
......@@ -1167,6 +1168,7 @@ route_lost(struct source *src, unsigned oldmetric)
the value of INFINITY. */
if(oldmetric <= INFINITY / 2)
send_request_resend(NULL, src->prefix, src->plen,
src->src_prefix, src->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