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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 03 Feb 2015 08:12:09 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc:	netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH net-next] veth: set iflink to the peer veth

On Tue, 2015-02-03 at 16:41 +0100, Nicolas Dichtel wrote:
> Now that the peer netns is advertised in rtnl messages, we can set this property
> so that IFLA_LINK will advertise the peer ifindex. It allows the userland to get
> the full veth configuration.
> 
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@...nd.com>
> ---
>  drivers/net/veth.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/veth.c b/drivers/net/veth.c
> index 4cca36ebc4fb..02d1f798a371 100644
> --- a/drivers/net/veth.c
> +++ b/drivers/net/veth.c
> @@ -427,9 +427,11 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
>  
>  	priv = netdev_priv(dev);
>  	rcu_assign_pointer(priv->peer, peer);
> +	dev->iflink = peer->ifindex;
>  
>  	priv = netdev_priv(peer);
>  	rcu_assign_pointer(priv->peer, dev);
> +	peer->iflink = dev->ifindex;
>  	return 0;
>  
>  err_register_dev:

Is is network namespace ready ?

If I move one veth to another namespace, is iflink still relevant ?


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ