diff options
author | Saurav Babu <saurav.babu@samsung.com> | 2016-07-18 16:43:53 +0530 |
---|---|---|
committer | Saurav Babu <saurav.babu@samsung.com> | 2016-09-01 08:49:41 +0530 |
commit | 5298369f5625fa7cab9ce742f9abbf2cdfbfea2d (patch) | |
tree | 0f9ade158657a6d2a54d437ba48e70d811cee4ee | |
parent | 69a8bedfd37134ac85430482e1e0c0fad22a6c6d (diff) | |
download | connman-5298369f5625fa7cab9ce742f9abbf2cdfbfea2d.tar.gz connman-5298369f5625fa7cab9ce742f9abbf2cdfbfea2d.tar.bz2 connman-5298369f5625fa7cab9ce742f9abbf2cdfbfea2d.zip |
Upstream: service: Enable ipconfig only for the changed IP typesubmit/tizen/20160907.012754submit/tizen/20160907.003226accepted/tizen/wearable/20160908.003612accepted/tizen/tv/20160908.003548accepted/tizen/mobile/20160908.003510accepted/tizen/ivi/20160908.003638accepted/tizen/common/20160907.154208
When IPv6.Configuration is changed to "off" then connman starts fresh
DHCP Requests for service after changing its state to Configuration.
In an ideal scenario IPv4 Configurations should not be affected on
changing IPv6.Configuration property.
This patch only enables ipconfig for the changed IP type and leaves
other IP type unchanged
Change-Id: I65eacb6711314d2674e709711f432ef706167fc4
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
-rwxr-xr-x | src/service.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/service.c b/src/service.c index f77f0339..1eae3807 100755 --- a/src/service.c +++ b/src/service.c @@ -4040,9 +4040,11 @@ static DBusMessage *set_property(DBusConnection *conn, if (err < 0) { if (is_connected_state(service, state) || is_connecting_state(service, state)) { - __connman_network_enable_ipconfig(service->network, + if (type == CONNMAN_IPCONFIG_TYPE_IPV4) + __connman_network_enable_ipconfig(service->network, service->ipconfig_ipv4); - __connman_network_enable_ipconfig(service->network, + else + __connman_network_enable_ipconfig(service->network, service->ipconfig_ipv6); } @@ -4055,10 +4057,12 @@ static DBusMessage *set_property(DBusConnection *conn, ipv6_configuration_changed(service); if (is_connecting(service) || is_connected(service)) { - __connman_network_enable_ipconfig(service->network, - service->ipconfig_ipv4); - __connman_network_enable_ipconfig(service->network, - service->ipconfig_ipv6); + if (type == CONNMAN_IPCONFIG_TYPE_IPV4) + __connman_network_enable_ipconfig(service->network, + service->ipconfig_ipv4); + else + __connman_network_enable_ipconfig(service->network, + service->ipconfig_ipv6); } service_save(service); |