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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 Mar 2016 14:26:49 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	eric.dumazet@...il.com
Cc:	dsa@...ulusnetworks.com, netdev@...r.kernel.org
Subject: Re: [PATCH net] net: ipv4: Multipath needs to handle unreachable
 nexthops

From: Eric Dumazet <eric.dumazet@...il.com>
Date: Thu, 24 Mar 2016 09:45:34 -0700

> On Thu, 2016-03-24 at 08:25 -0700, David Ahern wrote:
>> Multipath route lookups should consider knowledge about next hops and not
>> select a hop that is known to be failed.
> 
> Does not look a net candidate to me.
> 
>> Signed-off-by: David Ahern <dsa@...ulusnetworks.com>
>> ---
>>  net/ipv4/fib_semantics.c | 34 ++++++++++++++++++++++++++++++++--
>>  1 file changed, 32 insertions(+), 2 deletions(-)
>> 
>> diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
>> index d97268e8ff10..28fc6700c2b1 100644
>> --- a/net/ipv4/fib_semantics.c
>> +++ b/net/ipv4/fib_semantics.c
>> @@ -1563,13 +1563,43 @@ int fib_sync_up(struct net_device *dev, unsigned int nh_flags)
>>  void fib_select_multipath(struct fib_result *res, int hash)
>>  {
>>  	struct fib_info *fi = res->fi;
>> +	struct neighbour *n;
>> +	int state;
>>  
>>  	for_nexthops(fi) {
>>  		if (hash > atomic_read(&nh->nh_upper_bound))
>>  			continue;
>>  
>> -		res->nh_sel = nhsel;
>> -		return;
>> +		state = NUD_NONE;
>> +		n = neigh_lookup(&arp_tbl, &nh->nh_gw, fi->fib_dev);
>> +		if (n) {
>> +			state = n->nud_state;
>> +			neigh_release(n);
>> +		}
> 
> This looks like something that could use RCU to avoid expensive
> refcounting ?

Indeed, this is way too expensive as-is.

Powered by blists - more mailing lists