From 9ccbb57dedc7c64bb92e2042981b455c0f1d9243 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Wed, 6 Jun 2012 14:37:32 +0300 Subject: [PATCH] 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. --- src/ipconfig.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) { -- 2.7.4