diff options
author | Patrick McHardy <kaber@trash.net> | 2008-04-14 01:45:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-14 01:45:40 -0400 |
commit | 2ed9926e16094ad143b96b09c64cba8bcba05ee1 (patch) | |
tree | 80694dbe8455fe47053709bd3c14a7edab1a8c24 | |
parent | d2dcba612b357a4687843ad4f46629d219233fd7 (diff) |
[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>
-rw-r--r-- | net/ethernet/eth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index a7b417523e9b..a80839b02e3f 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c | |||
@@ -301,7 +301,7 @@ static int eth_change_mtu(struct net_device *dev, int new_mtu) | |||
301 | static int eth_validate_addr(struct net_device *dev) | 301 | static int eth_validate_addr(struct net_device *dev) |
302 | { | 302 | { |
303 | if (!is_valid_ether_addr(dev->dev_addr)) | 303 | if (!is_valid_ether_addr(dev->dev_addr)) |
304 | return -EINVAL; | 304 | return -EADDRNOTAVAIL; |
305 | 305 | ||
306 | return 0; | 306 | return 0; |
307 | } | 307 | } |