sgw: make sure gw->ipv6 is always set for a new gateway
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 15 Oct 2014 09:01:25 +0000 (11:01 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 15 Oct 2014 15:37:54 +0000 (17:37 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/gateway.c

index cc3fd6b..110be80 100644 (file)
@@ -922,6 +922,7 @@ void olsr_update_gateway_entry(union olsr_ip_addr *originator, union olsr_ip_add
 
   gw->ipv4 = (ptr[GW_HNA_FLAGS] & GW_HNA_FLAG_IPV4) != 0;
   gw->ipv4nat = (ptr[GW_HNA_FLAGS] & GW_HNA_FLAG_IPV4_NAT) != 0;
+  gw->ipv6 = false;
 
   if (olsr_cnf->ip_version == AF_INET6) {
     gw->ipv6 = (ptr[GW_HNA_FLAGS] & GW_HNA_FLAG_IPV6) != 0;