[Olsr-dev] [PATCH v2 1/7] gateway: initialise the handler before setting up the tunnel

Ferry Huberts (spam-protected)
Thu Oct 18 11:50:37 CEST 2012


From: Ferry Huberts <(spam-protected)>

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 src/gateway.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gateway.c b/src/gateway.c
index 99c191f..17eeefa 100644
--- a/src/gateway.c
+++ b/src/gateway.c
@@ -164,16 +164,16 @@ int olsr_init_gateways(void) {
 
   refresh_smartgw_netmask();
 
+  /* initialize default gateway handler */
+  gw_handler = &gw_def_handler;
+  gw_handler->init();
+
   if (olsr_os_init_iptunnel(olsr_cnf->ip_version == AF_INET ? TUNNEL_ENDPOINT_IF : TUNNEL_ENDPOINT_IF6)) {
     return 1;
   }
 
   olsr_add_ifchange_handler(smartgw_tunnel_monitor);
 
-  /* initialize default gateway handler */
-  gw_handler = &gw_def_handler;
-  gw_handler->init();
-
   return 0;
 }
 
-- 
1.7.11.7





More information about the Olsr-dev mailing list