Subject: Re: [PATCH net] ipvlan: fix addr hash list corruption

From: Jiri Benc <[email-masked]>
Date: Thu, 26 Mar 2015 00:49:09 +0100

On Thu, 26 Mar 2015 00:21:53 +0100, Jiri Benc wrote:
> On Wed, 25 Mar 2015 11:11:47 -0700, Mahesh Bandewar wrote:
> > Yes functionally you will get the same result. However during the RX
> > processing, that code helps ipvlan-demux machine along with
> > packet-dispatcher to determine it early to drop the packet rather than
> > later.
> 
> When the interface is down, this doesn't matter, does it? You don't
> send/receive anything when the interface is down.

But obviously, with more ipvlan interfaces under the same master, some
of them being up and some down, it may be beneficial to keep the
addresses of interfaces that are down off the hash list. Which means my
original patch was correct after all...

Another question is whether the logic in ipvlan_addr_busy is correct.
To my understanding, the purpose of ipvlan_ht_addr_lookup call in
ipvlan_addr_busy is to ensure two interfaces under the same master
cannot have the same IP address assigned. As assigned addresses may not
be on the hash list when an interface is down, this check does not
really work. Note that this problem is already present in the current
code, with or without any patches currently discussed.

 Jiri

-- 
Jiri Benc