[Olsr-dev] [PATCH 2/4] smart gateway: do not stop choosing a new (better) gateway

Ferry Huberts (spam-protected)
Thu Dec 8 08:44:12 CET 2011


On 12/08/2011 08:20 AM, Henning Rogge wrote:
> On 12/06/2011 10:14 AM, Ferry Huberts wrote:
>> From: Ferry Huberts<(spam-protected)>
>>
>> Signed-off-by: Ferry Huberts<(spam-protected)>
>> ---
>>   src/gateway_default_handler.c |    6 ------
>>   1 files changed, 0 insertions(+), 6 deletions(-)
>>
>> diff --git a/src/gateway_default_handler.c
>> b/src/gateway_default_handler.c
>> index a18dba8..50986b3 100644
>> --- a/src/gateway_default_handler.c
>> +++ b/src/gateway_default_handler.c
>> @@ -76,12 +76,6 @@ static void gw_default_choose_gateway(void) {
>>     if (inet_ipv6&&  !dual) {
>>       olsr_set_inet_gateway(&inet_ipv6->originator, false, true, false);
>>     }
>> -
>> -  /* finished ? */
>> -  if (gw_def_finished_ipv4&&  gw_def_finished_ipv6) {
>> -    olsr_stop_timer(gw_def_timer);
>> -    gw_def_timer = NULL;
>> -  }
>>   }
>>
>>   /* timer for lazy gateway selection */
> 
> Have to look at this more closely. The idea behind the "default" gateway
> selector is to select a gateway and stick with it until its gone. Maybe
> "gone" is a bit too late, but if we start choosing another gateway too
> early, we might get gateway-flapping again.
> 

Agree.

However, in our highly mobile networks we have to do something.
This is a short term solution to make it work, and sending out the
patches was also meant to start a discussion on the best solution ;-)

The usual solution is to use some form of hysteresis. We might do
something like 'if there is a better gateway for at least x seconds,
then switch to it'.

What do you think?



-- 
Ferry Huberts




More information about the Olsr-dev mailing list