Subject: Re: [PATCH] net: clear iflink when moving to a new netns

From: Nicolas Dichtel <[email-masked]>
Date: Wed, 12 Feb 2014 16:43:22 +0100

Le 12/02/2014 00:51, Cong Wang a écrit :
> From: Cong Wang <[email-masked]>
>
> BZ: https://bugzilla.kernel.org/show_bug.cgi?id=66691
>
> macvlan and vlan both use iflink to identify its lower device,
> however, after such device is moved to the new netns, its iflink
> would become meaningless as ifindex is per netns. So, instead of
> forbid them moving to another netns, just clear this field so that
> it will not be dumped at least.
>
> Cc: David S. Miller <[email-masked]>
> Cc: Eric W. Biederman <[email-masked]>
> Cc: Eric Dumazet <[email-masked]>
> Cc: Hannes Frederic Sowa <[email-masked]>,
> Signed-off-by: Cong Wang <[email-masked]>
> Signed-off-by: Cong Wang <[email-masked]>
I wonder if this patch breaks things in ip tunnels.
For example, ip6_tunnel uses iflink to find tunnels that are bound to an interface.
If you reset this field, ipip6_tunnel_lookup() will fail when the tunnel moves
to another netns.