summaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/netback.c
diff options
context:
space:
mode:
authorSerhey Popovych <serhe.popovych@gmail.com>2017-06-21 12:12:24 +0300
committerDavid S. Miller <davem@davemloft.net>2017-06-22 11:15:15 -0400
commit191cdb3822e5df6b3c8b9f8cb8c4bf93f6cc90c7 (patch)
treebab1555b5bf4b75d18c150d810782590ec0cd589 /drivers/net/xen-netback/netback.c
parentb88ff4f8c9ef0279f82bca0a83ed860b654f0f8d (diff)
downloadop-kernel-dev-191cdb3822e5df6b3c8b9f8cb8c4bf93f6cc90c7.zip
op-kernel-dev-191cdb3822e5df6b3c8b9f8cb8c4bf93f6cc90c7.tar.gz
veth: Be more robust on network device creation when no attributes
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@veth1: <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@veth0: <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 both main and peer network devices with same name, that happens when name for main interface is given with IFLA_IFNAME and same attribute reused for 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@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback/netback.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud