Enable the new ipconfig in __connman_service_reset_ipconfig so that all
the logic is in one place. If the ipconfig could not be set, indicate
failure for that ipconfig type only.
Fixes BMC#26004
---
src/service.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/service.c b/src/service.c
index 5c7a014..246bdcf 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3034,7 +3034,16 @@ int __connman_service_reset_ipconfig(struct
connman_service *service,
service->ipconfig_ipv6 = new_ipconfig;
}
- __connman_ipconfig_enable(new_ipconfig);
+ if (is_connecting_state(service, state) ||
+ is_connected_state(service, state)) {
+
+ err = __connman_network_set_ipconfig(service->network,
+ new_ipconfig);
+ if (err < 0)
+ __connman_service_ipconfig_indicate_state(service,
+ CONNMAN_SERVICE_STATE_FAILURE, type);
+
+ }
if (new_state != NULL && new_method != old_method) {
if (type == CONNMAN_IPCONFIG_TYPE_IPV4)
--
1.7.10.4
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman