Hi Jukka,

On Thu, Feb 17, 2011 at 03:50:05PM +0200, Jukka Rissanen wrote:
> ---
>  src/ipconfig.c |  113 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
>  1 files changed, 109 insertions(+), 4 deletions(-)
> 
> diff --git a/src/ipconfig.c b/src/ipconfig.c
> index 1fb8281..481133b 100644
> --- a/src/ipconfig.c
> +++ b/src/ipconfig.c
> @@ -51,6 +51,8 @@ struct connman_ipconfig {
>       enum connman_ipconfig_method method;
>       struct connman_ipaddress *address;
>       struct connman_ipaddress *system;
> +
> +     int ipv6_privacy;
>  };
Let's call this one ipv6_privacy_config.


> @@ -926,6 +992,7 @@ static struct connman_ipconfig *create_ipv6config(int 
> index)
>       ipv6config->index = index;
>       ipv6config->type = CONNMAN_IPCONFIG_TYPE_IPV6;
>       ipv6config->method = CONNMAN_IPCONFIG_METHOD_AUTO;
> +     ipv6config->ipv6_privacy = 1;
So I'd like this one to be set to 0. 1 would be fine if we wouldn't let the
user select it, otherwise it should just be 0.

  
> @@ -1827,6 +1916,15 @@ int __connman_ipconfig_load(struct connman_ipconfig 
> *ipconfig,
>                               keyfile, identifier, key, NULL);
>       g_free(key);
>  
> +     if (ipconfig->type == CONNMAN_IPCONFIG_TYPE_IPV6) {
> +             key = g_strdup_printf("%sprivacy", prefix);
> +             ipconfig->ipv6_privacy = g_key_file_get_integer(
> +                             keyfile, identifier, key, NULL);
> +             if (ipconfig->method == CONNMAN_IPCONFIG_METHOD_AUTO)
> +                     enable_ipv6(ipconfig);
This should be part of the first 
        if (ipconfig->type == CONNMAN_IPCONFIG_TYPE_IPV6) {
                if (ipconfig->method == CONNMAN_IPCONFIG_METHOD_AUTO ||
                        ipconfig->method == CONNMAN_IPCONFIG_METHOD_MANUAL) {

block. This way we get the privacy value there and avoid calling enable_ipv6
twice.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to