ipconfig: Set the IPv6 gateway address only from an IPv6 config
authorJukka Rissanen <jukka.rissanen@nokia.com>
Thu, 9 Dec 2010 11:11:52 +0000 (13:11 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 14 Dec 2010 17:59:40 +0000 (18:59 +0100)
src/ipconfig.c

index 9ba8486..cf164c0 100644 (file)
@@ -1254,7 +1254,8 @@ void __connman_ipconfig_set_element_ipv6_gateway(
                        struct connman_ipconfig *ipconfig,
                                struct connman_element *element)
 {
-       element->ipv6.gateway = ipconfig->address->gateway;
+       if (ipconfig->type == CONNMAN_IPCONFIG_TYPE_IPV6)
+               element->ipv6.gateway = ipconfig->address->gateway;
 }
 
 /*