Hi,

On Thu, 2014-12-18 at 16:02 +0200, [email protected] wrote:
> From: Pasi Sjöholm <[email protected]>
> 
> IPv6 configuration method is either CONNMAN_IPCONFIG_METHOD_FIXED
> (ipv6-pdp) or CONNMAN_IPCONFIG_METHOD_AUTO (SLAAC/DHCPv6,
> dual/ipv4v6-pdp).
> ---
>  plugins/ofono.c | 26 ++++++++++++++++----------
>  1 file changed, 16 insertions(+), 10 deletions(-)
> 
> diff --git a/plugins/ofono.c b/plugins/ofono.c
> index 782c93e..b60e7ba 100644
> --- a/plugins/ofono.c
> +++ b/plugins/ofono.c
> @@ -916,19 +916,25 @@ static void extract_ipv6_settings(DBusMessageIter 
> *array,
>       if (index < 0)
>               goto out;
>  
> -     context->ipv6_method = CONNMAN_IPCONFIG_METHOD_FIXED;
> +     if (address) {

For the IPv4 case ipconfig method is set according to the "Method"
attribute. Why is the same not done for IPv6?
 
> -     context->ipv6_address =
> -             connman_ipaddress_alloc(CONNMAN_IPCONFIG_TYPE_IPV6);
> -     if (!context->ipv6_address)
> -             goto out;
> +             context->ipv6_address =
> +                     connman_ipaddress_alloc(CONNMAN_IPCONFIG_TYPE_IPV6);
> +             if (!context->ipv6_address)
> +                     goto out;
>  
> -     context->index = index;
> -     connman_ipaddress_set_ipv6(context->ipv6_address, address,
> -                             prefix_length, gateway);
> +             context->ipv6_method = CONNMAN_IPCONFIG_METHOD_FIXED;
>  
> -     g_free(context->ipv6_nameservers);
> -     context->ipv6_nameservers = nameservers;
> +             context->index = index;
> +             connman_ipaddress_set_ipv6(context->ipv6_address, address,
> +                                     prefix_length, gateway);
> +
> +             g_free(context->ipv6_nameservers);
> +             context->ipv6_nameservers = nameservers;
> +     } else {
> +             context->index = index;
> +             context->ipv6_method = CONNMAN_IPCONFIG_METHOD_AUTO;
> +     }
>  
>  out:
>       if (context->ipv6_nameservers != nameservers)

Cheers,

        Patrik


_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to