mirror of
https://github.com/ipxe/ipxe
synced 2025-12-12 14:32:49 +03:00
[netdevice] Allow the hardware and link-layer addresses to differ in size
IPoIB has a 20-byte link-layer address, of which only eight bytes represent anything relating to a "hardware address". The PXE and EFI SNP APIs expect the permanent address to be the same size as the link-layer address, so fill in the "permanent address" field with the initial link layer address (as generated by register_netdev() based upon the real hardware address).
This commit is contained in:
@@ -358,8 +358,7 @@ int register_netdev ( struct net_device *netdev ) {
|
||||
ifindex++ );
|
||||
|
||||
/* Set initial link-layer address */
|
||||
memcpy ( netdev->ll_addr, netdev->hw_addr,
|
||||
netdev->ll_protocol->ll_addr_len );
|
||||
netdev->ll_protocol->init_addr ( netdev->hw_addr, netdev->ll_addr );
|
||||
|
||||
/* Register per-netdev configuration settings */
|
||||
if ( ( rc = register_settings ( netdev_settings ( netdev ),
|
||||
|
||||
Reference in New Issue
Block a user