geneve: Initialize ethernet address in device setup.
authorPravin B Shelar <pshelar@nicira.com>
Thu, 27 Aug 2015 06:46:48 +0000 (23:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Aug 2015 22:42:47 +0000 (15:42 -0700)
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Reviewed-by: Jesse Gross <jesse@nicira.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Acked-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/geneve.c

index 897e1a3f035bc227fdcf3b181a349dbd49cbd629..95e9da0a52f2f1b7e4e8901788f6089540d5576d 100644 (file)
@@ -297,6 +297,7 @@ static void geneve_setup(struct net_device *dev)
 
        netif_keep_dst(dev);
        dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
+       eth_hw_addr_random(dev);
 }
 
 static const struct nla_policy geneve_policy[IFLA_GENEVE_MAX + 1] = {
@@ -364,9 +365,6 @@ static int geneve_newlink(struct net *net, struct net_device *dev,
                        return -EBUSY;
        }
 
-       if (tb[IFLA_ADDRESS] == NULL)
-               eth_hw_addr_random(dev);
-
        err = register_netdevice(dev);
        if (err)
                return err;