[PATCH] kni: fix device address set

Stephen Hemminger stephen at networkplumber.org
Wed Apr 6 17:17:00 CEST 2022


On Wed, 6 Apr 2022 16:22:13 +0800
"Min Hu (Connor)" <humin29 at huawei.com> wrote:

>  	/* if user has provided a valid mac address */
>  	if (is_valid_ether_addr(dev_info.mac_addr))
> -		memcpy(net_dev->dev_addr, dev_info.mac_addr, ETH_ALEN);
> +		memcpy(mac_addr, dev_info.mac_addr, ETH_ALEN);

Minor enhancement. Could this use ether_addr_copy instead?
		ether_addr_copy(mac_addr, dev_info.mac_addr);


More information about the dev mailing list