Commit 22def78c authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Send an ihu whenever the hello interval changes.

parent a990f526
...@@ -356,14 +356,17 @@ message_source_id(struct network *net) ...@@ -356,14 +356,17 @@ message_source_id(struct network *net)
void void
send_hello(struct network *net) send_hello(struct network *net)
{ {
int changed;
debugf("Sending hello to %s.\n", net->ifname); debugf("Sending hello to %s.\n", net->ifname);
update_hello_interval(net); changed = update_hello_interval(net);
net->hello_seqno = ((net->hello_seqno + 1) & 0xFFFF); net->hello_seqno = ((net->hello_seqno + 1) & 0xFFFF);
net->hello_time = now.tv_sec; net->hello_time = now.tv_sec;
send_message(net, 0, 0, net->hello_seqno, send_message(net, 0, 0, net->hello_seqno,
100 * net->hello_interval > 0xFFFF ? 100 * net->hello_interval > 0xFFFF ?
0 : 100 * net->hello_interval, 0 : 100 * net->hello_interval,
myid); myid);
if(changed)
send_ihu(NULL, net);
} }
void void
......
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