Commit 71bffe55 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[ETH]: Validate address in eth_mac_addr

Signed-off-by: default avatarPatrick McHardy <>
Signed-off-by: default avatarDavid S. Miller <>
parent 50b65cc6
......@@ -266,8 +266,11 @@ void eth_header_cache_update(struct hh_cache *hh, struct net_device *dev,
static int eth_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))
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment