Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net/hyperv: fix wrong length of mac address

This patch fixed wrong mac length, it should be ETH_ALEN,
also replaced the hardcode 6 in hyperv_net.h

Signed-off-by: Amos Kong <kongjianjun@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jianjun Kong and committed by
David S. Miller
9a4c831e c1acd709

+2 -2
+1 -1
drivers/net/hyperv/hyperv_net.h
··· 84 84 }; 85 85 86 86 struct netvsc_device_info { 87 - unsigned char mac_adr[6]; 87 + unsigned char mac_adr[ETH_ALEN]; 88 88 bool link_state; /* 0 - link up, 1 - link down */ 89 89 int ring_size; 90 90 };
+1 -1
drivers/net/hyperv/netvsc_drv.c
··· 349 349 struct net_device_context *ndevctx = netdev_priv(ndev); 350 350 struct hv_device *hdev = ndevctx->device_ctx; 351 351 struct sockaddr *addr = p; 352 - char save_adr[14]; 352 + char save_adr[ETH_ALEN]; 353 353 unsigned char save_aatype; 354 354 int err; 355 355