datapath: Allow datapath device MAC address to be changed while it is up.
authorBen Pfaff <blp@nicira.com>
Tue, 3 Mar 2009 19:34:52 +0000 (11:34 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 3 Mar 2009 21:51:14 +0000 (13:51 -0800)
vswitchd wants to do this, and I don't see a reason to disallow it.

datapath/dp_dev.c

index d522347f295adbe7cf9d861284972a90c2259aa7..bc6cb03db18800a1241bc3be4a9b8f63533d8624 100644 (file)
@@ -48,8 +48,6 @@ static int dp_dev_mac_addr(struct net_device *dev, void *p)
 {
        struct sockaddr *addr = p;
 
-       if (netif_running(dev))
-               return -EBUSY;
        if (!is_valid_ether_addr(addr->sa_data))
                return -EADDRNOTAVAIL;
        memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);