lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 17 Feb 2016 11:09:29 -0700
From:	David Ahern <dsa@...ulusnetworks.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, hannes@...essinduktion.org
Subject: Re: [PATCH] net: ipv6: Make address flushing on ifdown optional

On 2/17/16 11:05 AM, David Miller wrote:
> From: David Ahern <dsa@...ulusnetworks.com>
> Date: Sat, 13 Feb 2016 14:23:27 -0800
>
>> @@ -3427,31 +3493,52 @@ static int addrconf_ifdown(struct net_device *dev, int how)
>>   		write_lock_bh(&idev->lock);
>>   	}
>>
>> -	while (!list_empty(&idev->addr_list)) {
>> -		ifa = list_first_entry(&idev->addr_list,
>> -				       struct inet6_ifaddr, if_list);
>> -		addrconf_del_dad_work(ifa);
>> +	INIT_LIST_HEAD(&del_list);
>> +	list_for_each_entry_safe(ifa, tmp, &idev->addr_list, if_list) {
>> +		bool keep_ifa = false;
>>
>> -		list_del(&ifa->if_list);
>> +		if (!how && keep_addr && ifa->user_managed)
>> +			keep_ifa = true;
>
> I think it would make sense to evaluate "!how && keep_addr" outside the
> loop.  The only thing that changes is ifa->user_managed on each iteration.
>
> But I also want some more documentation in what you are doing here.
>
> I understand the address flushing on ifdown avoidance, but all of this
> user_managed logic is not mentioned at all.  Why do you need it?  What
> role does it play in achieving your goal?
>

Per prior comment user_managed will go away in favor of checking 
IFA_F_PERMANENT. We are only keeping permanent addresses which in past 
versions of the patch were marked with user_managed flag but it is 
redundant.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ