From: Jukka Rissanen Date: Wed, 6 Jun 2012 11:37:32 +0000 (+0300) Subject: ipconfig: Set IPv6 privacy default value from kernel default X-Git-Tag: 1.2~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=9ccbb57dedc7c64bb92e2042981b455c0f1d9243;p=platform%2Fupstream%2Fconnman.git ipconfig: Set IPv6 privacy default value from kernel default Use value set in the kernel as the initial IPv6 privacy setting. This also allows distros to set the privacy value without needing to tweak connman. --- diff --git a/src/ipconfig.c b/src/ipconfig.c index 3b85827..b401c23 100644 --- a/src/ipconfig.c +++ b/src/ipconfig.c @@ -1245,6 +1245,7 @@ void __connman_ipconfig_set_prefixlen(struct connman_ipconfig *ipconfig, unsigne static struct connman_ipconfig *create_ipv6config(int index) { struct connman_ipconfig *ipv6config; + struct connman_ipdevice *ipdevice; DBG("index %d", index); @@ -1258,7 +1259,10 @@ static struct connman_ipconfig *create_ipv6config(int index) ipv6config->enabled = FALSE; ipv6config->type = CONNMAN_IPCONFIG_TYPE_IPV6; ipv6config->method = CONNMAN_IPCONFIG_METHOD_AUTO; - ipv6config->ipv6_privacy_config = 0; + + ipdevice = g_hash_table_lookup(ipdevice_hash, GINT_TO_POINTER(index)); + if (ipdevice != NULL) + ipv6config->ipv6_privacy_config = ipdevice->ipv6_privacy; ipv6config->address = connman_ipaddress_alloc(AF_INET6); if (ipv6config->address == NULL) {