From e9e35a8f93ac6ccbd07f614064ff5b0a465a1186 Mon Sep 17 00:00:00 2001 From: Jeremy Lakeman Date: Wed, 13 Jan 2016 12:01:29 +1030 Subject: [PATCH] Use the unicast tick_ms for link ACK's, if configured --- route_link.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/route_link.c b/route_link.c index 85789ca3..a8282bd1 100644 --- a/route_link.c +++ b/route_link.c @@ -900,7 +900,15 @@ static int send_neighbour_link(struct neighbour *n) n->best_link->ack_counter = ACK_WINDOW; n->last_update = now; } - n->next_neighbour_update = n->last_update + n->best_link->interface->destination->ifconfig.tick_ms; + { + struct overlay_interface *i = n->best_link->interface; + int delay = 0; + if (n->best_link->unicast) + delay = i->ifconfig.unicast.tick_ms; + if (delay==0) + delay = i->destination->ifconfig.tick_ms; + n->next_neighbour_update = n->last_update + delay; + } DEBUGF(ack, "Next update for %s in %"PRId64"ms", alloca_tohex_sid_t(n->subscriber->sid), n->next_neighbour_update - gettime_ms()); OUT(); return 0;