Re: [PATCH] fix tuntap oversight

From: David S. Miller
Date: Mon Apr 12 2004 - 02:19:42 EST


On Sun, 11 Apr 2004 23:59:47 -0700
Jeremy Martin <martinjd@xxxxxxxxxxx> wrote:

> +static int tun_mac_addr(struct net_device *dev, void *p)
> +{
> + struct sockaddr *addr=p;
> + if (netif_running(dev))
> + return -EBUSY;
> + memcpy(dev->dev_addr, addr->sa_data,dev->addr_len);
> + return 0;
> +}

This netif_running() check is not necessary, and in fact
wrong.

In fact, if ethernet drivers erroneously do this, this causes
them to fail to support the ALB bonding driver modes which
require on-the-fly MAC address changes while the interface is
up.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/