gateway: initialise all variables in olsr_init_gateways
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 24 Jul 2012 15:29:28 +0000 (17:29 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 25 Jul 2012 06:55:06 +0000 (08:55 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/gateway.c

index 007ef54..e1c0fa2 100644 (file)
@@ -198,11 +198,16 @@ olsr_init_gateways(void) {
   olsr_cookie_set_memory_size(gw_mem_cookie, sizeof(struct gateway_entry));
 
   avl_init(&gateway_tree, avl_comp_default);
-  current_ipv4_gw = NULL;
-  current_ipv6_gw = NULL;
 
+  current_ipv4_gw = NULL;
   v4gw_tunnel = NULL;
+  v4gw_choosen_external = false;
+
+  current_ipv6_gw = NULL;
   v6gw_tunnel = NULL;
+  v6gw_choosen_external = false;
+
+  gw_handler = NULL;
 
   refresh_smartgw_netmask();