dect
/
linux-2.6
Archived
13
0
Fork 0

[NET]: Return more appropriate error from eth_validate_addr().

Paul Bolle wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=9923 would have been much easier to
> track down if eth_validate_addr() would somehow complain aloud if an address 
> is invalid. Shouldn't it make at least some noise?

I guess it should return -EADDRNOTAVAIL similar to eth_mac_addr()
when validation fails.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Patrick McHardy 2008-04-13 22:45:40 -07:00 committed by David S. Miller
parent d2dcba612b
commit 2ed9926e16
1 changed files with 1 additions and 1 deletions

View File

@ -301,7 +301,7 @@ static int eth_change_mtu(struct net_device *dev, int new_mtu)
static int eth_validate_addr(struct net_device *dev)
{
if (!is_valid_ether_addr(dev->dev_addr))
return -EINVAL;
return -EADDRNOTAVAIL;
return 0;
}