diff options
author | Niraj Kumar Goit <niraj.g@samsung.com> | 2017-12-07 17:18:09 +0530 |
---|---|---|
committer | Niraj Kumar Goit <niraj.g@samsung.com> | 2017-12-07 17:38:29 +0530 |
commit | fc5cde2f21e82f0ea15fc9e41f7015ef03db061e (patch) | |
tree | 80b72998f70738306ccdcf7dfa5fde7a2efde8d3 /src/rtnl.c | |
parent | 72f98c00c468f34732c30ebbab885dee404d559a (diff) | |
download | connman-fc5cde2f21e82f0ea15fc9e41f7015ef03db061e.tar.gz connman-fc5cde2f21e82f0ea15fc9e41f7015ef03db061e.tar.bz2 connman-fc5cde2f21e82f0ea15fc9e41f7015ef03db061e.zip |
Process RDNSS option for IPv6 if connecting or connected.
Process RDNSS option for IPv6 if network is connecting or connected
and set IPv6 DNS address in the system.
Change-Id: I28bb7be76a60003364030d09aabfca27886531f3
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Diffstat (limited to 'src/rtnl.c')
-rwxr-xr-x | src/rtnl.c | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -1316,30 +1316,33 @@ static void rtnl_newnduseropt(struct nlmsghdr *hdr) #if defined TIZEN_EXT struct connman_service *service; + enum connman_service_state state; enum connman_dnsconfig_method ipv6_dns_method; - char *ifname; service = __connman_service_lookup_from_index(index); - if (!service || !(__connman_service_index_is_default(index))) { - DBG("Invalid service, index: %d\n", index); + if (!service) { + DBG("Invalid service"); return; } DBG("service: %p index: %d\n", service, index); - ifname = connman_inet_ifname(index); - if (ifname == NULL) { - DBG("Interface is NULL, return"); - return; + if (connman_setting_get_bool("SingleConnectedTechnology") == TRUE) { + state = __connman_service_ipconfig_get_state(service, CONNMAN_IPCONFIG_TYPE_IPV6); + if (state != CONNMAN_SERVICE_STATE_ASSOCIATION && + state != CONNMAN_SERVICE_STATE_CONFIGURATION && + state != CONNMAN_SERVICE_STATE_READY && + state != CONNMAN_SERVICE_STATE_ONLINE) { + DBG("Service state[%d] is not connecting/connected", state); + return; + } } ipv6_dns_method = connman_service_get_ipv6_dns_method(service); if (ipv6_dns_method != CONNMAN_DNSCONFIG_METHOD_DHCP) { DBG("IPv6 DNS method is not Auto ignore RA!!! [DNS method: %d]", ipv6_dns_method); - g_free(ifname); return; } - g_free(ifname); #endif for (opt = (void *)&msg[1]; |