Skip to contentSkip to conversation

net: fix wrong length of mac address

PATCH Superseded Amos Kong 2 participants 2 messages Jan 18, 2013

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Amos Kong

author
#0 lore raw

PATCH 1/1 net: fix wrong length of mac address

Replace hardcode 14 with defined ETN_ALEN.

---
 drivers/net/hyperv/netvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +1 -1
index f825a62..8264f0e 100644
@@ -349,7 +349,7 @@ static int netvsc_set_mac_addr(struct net_device *ndev, void *p)
 	struct net_device_context *ndevctx = netdev_priv(ndev);
 	struct hv_device *hdev =  ndevctx->device_ctx;
 	struct sockaddr *addr = p;
-	char save_adr[14];
+	char save_adr[ETH_ALEN];
 	unsigned char save_aatype;
 	int err;
 
Signature · 1 line
1.7.11.7
#1 lore raw

You should still CC Haiyang Zhang and KY (as well as netdev). Use ./scripts/get_maintainer.pl -f drivers/net/hyperv/netvsc_drv.c to find out where to send patches.

Quoted 1 line · Amos Kong

Replace hardcode 14 with defined ETN_ALEN.

                                     ^

Typo. It should be ETH_ALEN.

regards,
dan carpenter