Commit 70a6297a authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Compute id hash in really_send_update.

parent 7a2fb13c
...@@ -520,8 +520,7 @@ static void ...@@ -520,8 +520,7 @@ static void
really_send_update(struct network *net, really_send_update(struct network *net,
const unsigned char *address, const unsigned char *address,
const unsigned char *prefix, unsigned char plen, const unsigned char *prefix, unsigned char plen,
unsigned short seqno, unsigned short metric, unsigned short seqno, unsigned short metric)
unsigned short router_hash)
{ {
if(in_prefix(address, prefix, plen)) { if(in_prefix(address, prefix, plen)) {
send_message(net, 3, plen, 0, seqno, metric, address); send_message(net, 3, plen, 0, seqno, metric, address);
...@@ -533,7 +532,7 @@ really_send_update(struct network *net, ...@@ -533,7 +532,7 @@ really_send_update(struct network *net,
send_message(net, 3, 0xFF, 0, 0, 0xFFFF, address); send_message(net, 3, 0xFF, 0, 0, 0xFFFF, address);
send_message(net, 4, plen, 0, seqno, metric, prefix); send_message(net, 4, plen, 0, seqno, metric, prefix);
} }
satisfy_request(prefix, plen, seqno, router_hash, net); satisfy_request(prefix, plen, seqno, hash_id(address), net);
} }
void void
...@@ -561,8 +560,7 @@ flushupdates(void) ...@@ -561,8 +560,7 @@ flushupdates(void)
if(xroute) { if(xroute) {
really_send_update(net, myid, really_send_update(net, myid,
xroute->prefix, xroute->plen, xroute->prefix, xroute->plen,
myseqno, xroute->metric, myseqno, xroute->metric);
hash_id(myid));
continue; continue;
} }
route = find_installed_route(buffered_updates[i].prefix, route = find_installed_route(buffered_updates[i].prefix,
...@@ -576,8 +574,7 @@ flushupdates(void) ...@@ -576,8 +574,7 @@ flushupdates(void)
really_send_update(net, route->src->address, really_send_update(net, route->src->address,
route->src->prefix, route->src->prefix,
route->src->plen, route->src->plen,
seqno, metric, seqno, metric);
hash_id(route->src->address));
update_source(route->src, seqno, metric); update_source(route->src, seqno, metric);
continue; continue;
} }
...@@ -587,7 +584,7 @@ flushupdates(void) ...@@ -587,7 +584,7 @@ flushupdates(void)
really_send_update(net, src->address, src->prefix, src->plen, really_send_update(net, src->address, src->prefix, src->plen,
src->metric >= INFINITY ? src->metric >= INFINITY ?
src->seqno : seqno_plus(src->seqno, 1), src->seqno : seqno_plus(src->seqno, 1),
INFINITY, hash_id(src->address)); INFINITY);
continue; continue;
} }
} }
...@@ -750,7 +747,7 @@ send_self_retract(struct network *net) ...@@ -750,7 +747,7 @@ send_self_retract(struct network *net)
for(i = 0; i < numxroutes; i++) { for(i = 0; i < numxroutes; i++) {
if(xroutes[i].exported) if(xroutes[i].exported)
really_send_update(net, myid, xroutes[i].prefix, xroutes[i].plen, really_send_update(net, myid, xroutes[i].prefix, xroutes[i].plen,
myseqno, 0xFFFF, hash_id(myid)); myseqno, 0xFFFF);
} }
schedule_update_flush(net, 1); schedule_update_flush(net, 1);
} }
......
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