From: Seonah Moon Date: Tue, 31 Oct 2017 04:35:57 +0000 (+0900) Subject: Fixed gateway issue for ipv6 X-Git-Tag: accepted/tizen/unified/20171106.073053~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F13%2F158313%2F1;p=platform%2Fupstream%2Fconnman.git Fixed gateway issue for ipv6 Change-Id: I27a77e6a39fb11095446c95fb9765da5e7e156f6 Signed-off-by: Taesub Kim --- diff --git a/src/dhcpv6.c b/src/dhcpv6.c index bf4da3e..85714e9 100755 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -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)); }