[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m3bn3mg1j3.fsf@neo.luffy.cx>
Date: Tue, 31 May 2016 08:54:56 +0200
From: Vincent Bernat <vincent@...nat.im>
To: Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Vijay Pandurangan <vijayp@...ayp.ca>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Subject: Re: [net v4] veth: advertise peer link once both links are tied together
❦ 31 mai 2016 08:30 CEST, Vincent Bernat <vincent@...nat.im> :
> diff --git a/drivers/net/veth.c b/drivers/net/veth.c
> index f37a6e61d4ad..aaa1b023b9f2 100644
> --- a/drivers/net/veth.c
> +++ b/drivers/net/veth.c
> @@ -466,6 +466,8 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
>
> priv = netdev_priv(peer);
> rcu_assign_pointer(priv->peer, dev);
> +
> + rtmsg_ifinfo(RTM_NEWLINK, peer, ~0U, GFP_KERNEL);
> return 0;
Well, this is wrong here too because the NEWLINK message for dev was not
issued either (link state is not initialized), so we are back to square
one.
3: veth0@...E: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default
link/ether fa:ba:12:26:99:00 brd ff:ff:ff:ff:ff:ff
3: veth0@...h1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default
link/ether fa:ba:12:26:99:00 brd ff:ff:ff:ff:ff:ff
4: veth1@...h0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN group default
link/ether ea:e4:e2:26:3c:87 brd ff:ff:ff:ff:ff:ff
The netlink message for veth1 is sent by rtnl_newlink() after invocation
of veth_newlink(). So, I don't see any easy way to fix that. Maybe not
worth it.
--
Let the data structure the program.
- The Elements of Programming Style (Kernighan & Plauger)
Powered by blists - more mailing lists