[connman] Add IPv6 gateway address after service IP bound. 97/117897/1 accepted/tizen/common/20170309.175139 accepted/tizen/ivi/20170308.121241 accepted/tizen/mobile/20170308.121214 accepted/tizen/tv/20170308.121225 accepted/tizen/unified/20170310.080648 accepted/tizen/wearable/20170308.121234 submit/tizen/20170308.045955 submit/tizen_unified/20170310.011402
authorNiraj Kumar Goit <niraj.g@samsung.com>
Wed, 8 Mar 2017 04:03:48 +0000 (09:33 +0530)
committerNiraj Kumar Goit <niraj.g@samsung.com>
Wed, 8 Mar 2017 04:03:48 +0000 (09:33 +0530)
Add IPv6 gateway address after service IP bound to fix
state flow issue.

Change-Id: Ia30a834f52c7d849ee54305d0d370f629fc506bb
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
packaging/connman.spec
src/ipconfig.c
src/network.c
src/service.c

index b2e1d6a..3ad471b 100755 (executable)
@@ -4,7 +4,7 @@
 
 Name:           connman
 Version:        1.29
-Release:        20
+Release:        21
 License:        GPL-2.0+
 Summary:        Connection Manager
 Url:            http://connman.net
index 27d98b2..c178eb5 100755 (executable)
@@ -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)
index 78ce229..7fc954a 100755 (executable)
@@ -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;
 }
index e4de9e1..6ac6f6c 100755 (executable)
@@ -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);
 }