Fixed gateway issue for ipv6 13/158313/1
authorSeonah Moon <seonah1.moon@samsung.com>
Tue, 31 Oct 2017 04:35:57 +0000 (13:35 +0900)
committertaesub kim <taesub.kim@samsung.com>
Tue, 31 Oct 2017 05:25:12 +0000 (14:25 +0900)
Change-Id: I27a77e6a39fb11095446c95fb9765da5e7e156f6
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
src/dhcpv6.c

index bf4da3e..85714e9 100755 (executable)
@@ -685,6 +685,9 @@ static void set_address(int ifindex, struct connman_ipconfig *ipconfig,
                /* Is this prefix part of the subnet we are suppose to use? */
                prefix_len = check_ipv6_addr_prefix(prefixes, address);
 
+#if defined TIZEN_EXT
+               char *gateway = g_strdup(__connman_ipconfig_get_gateway(ipconfig));
+#endif
                __connman_ipconfig_address_remove(ipconfig);
                __connman_ipconfig_set_local(ipconfig, address);
                __connman_ipconfig_set_prefixlen(ipconfig, prefix_len);
@@ -692,6 +695,11 @@ static void set_address(int ifindex, struct connman_ipconfig *ipconfig,
                DBG("new address %s/%d", address, prefix_len);
 
                __connman_ipconfig_set_dhcp_address(ipconfig, address);
+#if defined TIZEN_EXT
+               DBG("Set gateway %s", gateway);
+               __connman_ipconfig_set_gateway(ipconfig, gateway);
+               g_free(gateway);
+#endif
                __connman_service_save(
                        __connman_service_lookup_from_index(ifindex));
        }