From f06c203488d8bfd26c227a1f5eae10f1e03e5e70 Mon Sep 17 00:00:00 2001 From: Jeremy Lakeman Date: Thu, 29 Aug 2013 16:51:50 +0930 Subject: [PATCH] Send successful, in-order ACK's based on link RTT --- route_link.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/route_link.c b/route_link.c index 2ac8e366..77e435f6 100644 --- a/route_link.c +++ b/route_link.c @@ -964,8 +964,11 @@ int link_state_ack_soon(struct subscriber *subscriber){ RETURN(0); time_ms_t now = gettime_ms(); - if (neighbour->using_us && neighbour->next_neighbour_update > now + 80){ - neighbour->next_neighbour_update = now + 80; + if (neighbour->using_us + && subscriber->reachable & REACHABLE_DIRECT + && subscriber->destination){ + if (neighbour->next_neighbour_update > now + subscriber->destination->min_rtt) + neighbour->next_neighbour_update = now + subscriber->destination->min_rtt; } update_alarm(neighbour->next_neighbour_update); OUT();