[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170620.124059.822096659295374001.davem@davemloft.net>
Date: Tue, 20 Jun 2017 12:40:59 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: serhe.popovych@...il.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] veth: Be more robust on network device creation when
no attributes
From: Serhey Popovych <serhe.popovych@...il.com>
Date: Fri, 16 Jun 2017 18:05:00 +0300
> There are number of problems with configuration peer
> network device in absence of IFLA_VETH_PEER attributes
> where attributes for main network device shared with
> peer.
>
> First it is not feasible to configure both network
> devices with same MAC address since this makes
> communication in such configuration problematic.
>
> This case can be reproduced with following sequence:
>
> # ip link add address 02:11:22:33:44:55 type veth
> # ip li sh
> ...
> 26: veth0@...h1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc \
> noop state DOWN mode DEFAULT qlen 1000
> link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
> 27: veth1@...h0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc \
> noop state DOWN mode DEFAULT qlen 1000
> link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
>
> Second it is not possible to register main network device
> with given name and automatically create peer network
> device name. That happens because IFLA_IFNAME used when
> creating main and reused when creating peer.
>
> This case can be reproduced with following sequence:
>
> # ip link add dev veth1a type veth
> RTNETLINK answers: File exists
>
> To fix both of the cases check if corresponding netlink
> attributes are taken from peer_tb when valid or
> name based on rtnl ops kind and random address is used.
>
> Signed-off-by: Serhey Popovych <serhe.popovych@...il.com>
This does not apply cleanly to the 'net' tree, please respin.
Powered by blists - more mailing lists