summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2011-06-01 00:16:26 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-06-01 00:16:26 +0200
commit39825846a219b47b216d89cc036cf9640aaeead4 (patch)
tree2c90c201c3cba526e77d4488c8c3db98a9ac670c /src
parent6fd94b729495d6b9cdb66ae33adafd59f8b38957 (diff)
downloadconnman-39825846a219b47b216d89cc036cf9640aaeead4.tar.gz
connman-39825846a219b47b216d89cc036cf9640aaeead4.tar.bz2
connman-39825846a219b47b216d89cc036cf9640aaeead4.zip
dhcp: Call ipconfig_address_remove from dhcp_invalidate
Clearing the ipconfig fields is not enough, the actual rntl command needs to be sent for the IP to be cleared.
Diffstat (limited to 'src')
-rw-r--r--src/dhcp.c2
-rw-r--r--src/network.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/dhcp.c b/src/dhcp.c
index b391ddf6..ab8ee5a0 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -101,6 +101,8 @@ static void dhcp_invalidate(struct connman_dhcp *dhcp, connman_bool_t callback)
dhcp->nameservers[i]);
}
+ __connman_ipconfig_address_remove(ipconfig);
+
__connman_ipconfig_set_local(ipconfig, NULL);
__connman_ipconfig_set_broadcast(ipconfig, NULL);
__connman_ipconfig_set_gateway(ipconfig, NULL);
diff --git a/src/network.c b/src/network.c
index 1fa62ee4..95b4d4a9 100644
--- a/src/network.c
+++ b/src/network.c
@@ -683,15 +683,11 @@ err:
static void dhcp_failure(struct connman_network *network)
{
struct connman_service *service;
- struct connman_ipconfig *ipconfig_ipv4;
service = __connman_service_lookup_from_network(network);
if (service == NULL)
return;
- ipconfig_ipv4 = __connman_service_get_ip4config(service);
- __connman_ipconfig_address_remove(ipconfig_ipv4);
-
__connman_service_indicate_state(service, CONNMAN_SERVICE_STATE_IDLE,
CONNMAN_IPCONFIG_TYPE_IPV4);
}