The reason for this patch is that service disconnect code path
is different from service change code path. In disconnect,
the __connman_ipconfig_address_remove() is called which clears the
addresses from interface. When changing from one service to another,
the function __connman_service_disconnect() is not called and thus
the interface address is not removed.
We cannot call __connman_ipconfig_address_remove() yet at this point
because it would clear addresses from internal data structures so we
use __connman_ipconfig_address_unset() instead.
__connman_connection_gateway_remove(service,
CONNMAN_IPCONFIG_TYPE_ALL);
+ __connman_ipconfig_address_unset(ipconfig_ipv4);
+ __connman_ipconfig_address_unset(ipconfig_ipv6);
+
__connman_service_indicate_state(service,
CONNMAN_SERVICE_STATE_IDLE,
CONNMAN_IPCONFIG_TYPE_IPV4);