Commit 9d73a56a authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Force increasing seqno when myxroutes changed.

parent c6fdfd15
......@@ -353,7 +353,7 @@ main(int argc, char **argv)
for(i = 0; i < numnets; i++) {
send_hello(&nets[i]);
send_self_update(&nets[i]);
send_self_update(&nets[i], 0);
send_request(&nets[i], NULL);
}
......@@ -444,7 +444,7 @@ main(int argc, char **argv)
send_txcost(NULL, &nets[i]);
if(now.tv_sec >=
nets[i].self_update_time + nets[i].self_update_interval) {
send_self_update(&nets[i]);
send_self_update(&nets[i], 0);
}
}
......@@ -661,7 +661,7 @@ expire_routes(void)
rc = check_myxroutes();
if(rc > 0)
send_self_update(NULL);
send_self_update(NULL, 1);
else if(rc < 0)
fprintf(stderr, "Warning: couldn't check installed routes.\n");
......
......@@ -110,7 +110,7 @@ parse_packet(const unsigned char *from, struct network *net,
send_txcost(neigh, NULL);
send_update(NULL, neigh->network);
} else if(memcmp(message + 4, myid, 16) == 0) {
send_self_update(neigh->network);
send_self_update(neigh->network, 0);
} else {
struct destination *dest;
dest = find_destination(message + 4, 0, 0);
......@@ -515,10 +515,10 @@ send_update(struct destination *dest, struct network *net)
}
void
send_self_update(struct network *net)
send_self_update(struct network *net, int force_seqno)
{
debugf("Sending self update to %s.\n", net->ifname);
if(seqno_time + seqno_interval < now.tv_sec) {
if(force_seqno || seqno_time + seqno_interval < now.tv_sec) {
seqno++;
seqno_time = now.tv_sec;
}
......
......@@ -42,7 +42,7 @@ void send_hello(struct network *net);
void send_request(struct network *net, struct destination *dest);
void send_unicast_request(struct neighbour *neigh, struct destination *dest);
void send_update(struct destination *dest, struct network *net);
void send_self_update(struct network *net);
void send_self_update(struct network *net, int force_seqno);
void send_self_retract(struct network *net);
void send_neighbour_update(struct neighbour *neigh, struct network *net);
void send_txcost(struct neighbour *neigh, struct network *net);
......
......@@ -165,7 +165,7 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval)
int b = (neigh->reach & 0x3000);
if((a == 0xC000 && b == 0) || (a == 0 && b == 0x3000)) {
send_txcost(neigh, NULL);
send_self_update(neigh->network);
send_self_update(neigh->network, 0);
send_neighbour_update(neigh, NULL);
}
}
......
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