summaryrefslogtreecommitdiff
path: root/drivers/net/veth.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-06-30 12:43:08 -0400
committerDavid S. Miller <davem@davemloft.net>2017-06-30 12:43:08 -0400
commitb07911593719828cac023bdcf6bf4da1c9ba546f (patch)
treec4d2f66e6f2506e5b5439ffca0449e646f677b33 /drivers/net/veth.c
parent52a623bd6189b6ea8f06a0d7594c7604deaab24a (diff)
parent4d8a991d460d4fa4829beaffdcba45a217ca0fa7 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
A set of overlapping changes in macvlan and the rocker driver, nothing serious. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/veth.c')
-rw-r--r--drivers/net/veth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index b33553b1e19c..f5438d0978ca 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -385,7 +385,7 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
tbp = tb;
}
- if (tbp[IFLA_IFNAME]) {
+ if (ifmp && tbp[IFLA_IFNAME]) {
nla_strlcpy(ifname, tbp[IFLA_IFNAME], IFNAMSIZ);
name_assign_type = NET_NAME_USER;
} else {
@@ -404,7 +404,7 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
return PTR_ERR(peer);
}
- if (tbp[IFLA_ADDRESS] == NULL)
+ if (!ifmp || !tbp[IFLA_ADDRESS])
eth_hw_addr_random(peer);
if (ifmp && (dev->ifindex != 0))