[Top] [All Lists]

Re: [PATCH] fix tuntap oversight

To: Jeremy Martin <martinjd@xxxxxxxxxxx>
Subject: Re: [PATCH] fix tuntap oversight
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Mon, 12 Apr 2004 00:15:51 -0700
Cc: netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
In-reply-to: <20040412065947.GC18810@xxxxxxxxxxxxx>
References: <20040412065947.GC18810@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
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

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

<Prev in Thread] Current Thread [Next in Thread>