CONNMAN_IPCONFIG_TYPE_IPV4);
#else
__connman_service_nameserver_remove(service,
- dhcp->nameservers[i], false);
+ dhcp->nameservers[i], false);
#endif
}
g_strfreev(dhcp->nameservers);
struct connman_dhcp *dhcp = user_data;
dhcp->timeout = 0;
+
#if defined TIZEN_EXT
DBG("dhcp %p", dhcp);
DBG("dhcp->timeout %d", dhcp->timeout);
DBG("No lease available ipv4ll %d client %p", dhcp->ipv4ll_running,
dhcp->ipv4ll_client);
+#if defined TIZEN_EXT
+ if (connman_setting_get_bool("EnableAutoIp") == false) {
+ DBG("link-local address autoconfiguration is disabled.");
+ if (dhcp->network)
+ __connman_network_disconnect(dhcp->network);
+ return;
+ }
+#endif
if (dhcp->timeout > 0)
g_source_remove(dhcp->timeout);
}
}
+void __connman_dhcp_decline(struct connman_ipconfig *ipconfig)
+{
+ struct connman_dhcp *dhcp;
+ const char *address;
+ struct in_addr addr;
+
+ DBG("ipconfig_table %p ipconfig %p", ipconfig_table, ipconfig);
+
+ if (!ipconfig_table)
+ return;
+
+ dhcp = g_hash_table_lookup(ipconfig_table, ipconfig);
+ if (dhcp) {
+ address = __connman_ipconfig_get_local(ipconfig);
+ if (!address)
+ return;
+
+ if (inet_pton(AF_INET, address, &addr) != 1)
+ connman_error("Could not convert address %s", address);
+
+ g_dhcp_client_decline(dhcp->dhcp_client, htonl(addr.s_addr));
+ }
+}
+
int __connman_dhcp_init(void)
{
DBG("");
g_hash_table_destroy(ipconfig_table);
ipconfig_table = NULL;
-
- dhcp_cleanup_random();
}