+ if (!dhcp->network)
+ return true;
+
+ service = connman_service_lookup_from_network(dhcp->network);
+ if (!service) {
+ connman_error("Can not lookup service");
+ return false;
+ }
+
+ __connman_service_set_domainname(service, NULL);
+ __connman_ipconfig_set_proxy_autoconfig(dhcp->ipconfig, NULL);
+
+ if (dhcp->timeservers) {
+ for (i = 0; dhcp->timeservers[i]; i++) {
+ __connman_service_timeserver_remove(service,
+ dhcp->timeservers[i]);
+ }
+ g_strfreev(dhcp->timeservers);
+ dhcp->timeservers = NULL;
+ }
+ if (dhcp->nameservers) {
+ for (i = 0; dhcp->nameservers[i]; i++) {
+#if defined TIZEN_EXT
+ __connman_service_nameserver_remove(service,
+ dhcp->nameservers[i], false,
+ CONNMAN_IPCONFIG_TYPE_IPV4);
+#else
+ __connman_service_nameserver_remove(service,
+ dhcp->nameservers[i], false);
+#endif
+ }
+ g_strfreev(dhcp->nameservers);
+ dhcp->nameservers = NULL;
+ }
+
+ return true;
+}
+
+/**
+ * dhcp_invalidate: Invalidate an existing DHCP lease
+ * @dhcp: pointer to the DHCP lease to invalidate.
+ * @callback: flag indicating whether or not to invoke the client callback
+ * if present.
+ *
+ * Invalidates an existing DHCP lease, optionally invoking the client
+ * callback. The caller may wish to avoid the client callback invocation
+ * when the invocation of that callback might otherwise unnecessarily upset
+ * service state due to the IP configuration change implied by this
+ * invalidation.
+ */
+static void dhcp_invalidate(struct connman_dhcp *dhcp, bool callback)
+{
+ DBG("dhcp %p callback %u", dhcp, callback);
+
+ if (!dhcp)