❦ 31 mai 2016 08:30 CEST, Vincent Bernat <vinc...@bernat.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@NONE: <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@veth1: <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@veth0: <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)

Reply via email to