From: Niraj Kumar Goit Date: Wed, 8 Mar 2017 04:03:48 +0000 (+0530) Subject: [connman] Add IPv6 gateway address after service IP bound. X-Git-Tag: accepted/tizen/common/20170309.175139^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fconnman.git;a=commitdiff_plain;h=6613191eff5291c5992ee403557ef04caf9e650e [connman] Add IPv6 gateway address after service IP bound. Add IPv6 gateway address after service IP bound to fix state flow issue. Change-Id: Ia30a834f52c7d849ee54305d0d370f629fc506bb Signed-off-by: Niraj Kumar Goit --- diff --git a/packaging/connman.spec b/packaging/connman.spec index b2e1d6a..3ad471b 100755 --- a/packaging/connman.spec +++ b/packaging/connman.spec @@ -4,7 +4,7 @@ Name: connman Version: 1.29 -Release: 20 +Release: 21 License: GPL-2.0+ Summary: Connection Manager Url: http://connman.net diff --git a/src/ipconfig.c b/src/ipconfig.c index 27d98b2..c178eb5 100755 --- a/src/ipconfig.c +++ b/src/ipconfig.c @@ -1964,7 +1964,9 @@ void __connman_ipconfig_append_ipv6config(struct connman_ipconfig *ipconfig, { const char *str, *privacy; +#if !defined TIZEN_EXT DBG(""); +#endif str = __connman_ipconfig_method2string(ipconfig->method); if (!str) @@ -2008,7 +2010,9 @@ void __connman_ipconfig_append_ipv4config(struct connman_ipconfig *ipconfig, { const char *str; +#if !defined TIZEN_EXT DBG(""); +#endif str = __connman_ipconfig_method2string(ipconfig->method); if (!str) diff --git a/src/network.c b/src/network.c index 78ce229..7fc954a 100755 --- a/src/network.c +++ b/src/network.c @@ -1737,7 +1737,6 @@ void __connman_network_set_auto_ipv6_gateway(char *gateway, void *user_data) struct connman_network *network = user_data; struct connman_service *service; struct connman_ipconfig *ipconfig = NULL; - int err; service = connman_service_lookup_from_network(network); if (service == NULL) @@ -1748,11 +1747,6 @@ void __connman_network_set_auto_ipv6_gateway(char *gateway, void *user_data) return; __connman_ipconfig_set_gateway(ipconfig, gateway); - err = __connman_ipconfig_gateway_add(ipconfig, service); - - if(err == 0) - __connman_connection_gateway_activate(service, - CONNMAN_IPCONFIG_TYPE_IPV6); return; } diff --git a/src/service.c b/src/service.c index e4de9e1..6ac6f6c 100755 --- a/src/service.c +++ b/src/service.c @@ -7557,6 +7557,9 @@ static void service_ip_bound(struct connman_ipconfig *ipconfig, struct connman_service *service = __connman_ipconfig_get_data(ipconfig); enum connman_ipconfig_method method = CONNMAN_IPCONFIG_METHOD_UNKNOWN; enum connman_ipconfig_type type = CONNMAN_IPCONFIG_TYPE_UNKNOWN; +#if defined TIZEN_EXT + int err; +#endif DBG("%s ip bound", ifname); @@ -7568,9 +7571,19 @@ static void service_ip_bound(struct connman_ipconfig *ipconfig, if (type == CONNMAN_IPCONFIG_TYPE_IPV6 && method == CONNMAN_IPCONFIG_METHOD_AUTO) +#if defined TIZEN_EXT + { + err = __connman_ipconfig_gateway_add(ipconfig, service); + + if(err == 0) + __connman_connection_gateway_activate(service, + CONNMAN_IPCONFIG_TYPE_IPV6); + } +#else __connman_service_ipconfig_indicate_state(service, CONNMAN_SERVICE_STATE_READY, CONNMAN_IPCONFIG_TYPE_IPV6); +#endif settings_changed(service, ipconfig); }