[PATCH autoconf v3 06/12] ipv6: Clear the IPv6 address if that address is removed from system

Samuel Ortiz sameo at linux.intel.com
Fri Jan 7 15:51:30 PST 2011


Hi Jukka,

On Fri, Jan 07, 2011 at 02:55:13PM +0200, Jukka Rissanen wrote:
> ---
>  src/ipconfig.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/src/ipconfig.c b/src/ipconfig.c
> index 7a14c42..2c0ede6 100644
> --- a/src/ipconfig.c
> +++ b/src/ipconfig.c
> @@ -616,6 +616,15 @@ void __connman_ipconfig_deladdr(int index, int family, const char *label,
>  	ipdevice->address_list = g_slist_remove(ipdevice->address_list,
>  								ipaddress);
>  
> +	if (family == AF_INET6 && ipdevice->config_ipv6 &&
> +		ipdevice->config_ipv6->system &&
> +		ipdevice->config_ipv6->system->prefixlen ==
> +						ipaddress->prefixlen &&
> +		g_strcmp0(ipdevice->config_ipv6->system->local,
> +				ipaddress->local) == 0) {
> +		connman_ipaddress_clear(ipdevice->config_ipv6->system);
> +	}
> +
Why do we need to do that for IPv6, and why can't we just do:

if (family == AF_INET6)
	connman_ipaddress_clear(ipaddress);

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/



More information about the connman mailing list