diff options
author | Michael Brown | 2009-08-12 00:40:27 +0200 |
---|---|---|
committer | Michael Brown | 2009-08-12 01:23:38 +0200 |
commit | 4eab5bc8ca6b66dc965cf188dd4577ad19c5b879 (patch) | |
tree | 840f354a2f0efa010368118729e8f16315abc1c4 /src/net/netdevice.c | |
parent | [netdevice] Separate out the concept of hardware and link-layer addresses (diff) | |
download | ipxe-4eab5bc8ca6b66dc965cf188dd4577ad19c5b879.tar.gz ipxe-4eab5bc8ca6b66dc965cf188dd4577ad19c5b879.tar.xz ipxe-4eab5bc8ca6b66dc965cf188dd4577ad19c5b879.zip |
[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).
Diffstat (limited to 'src/net/netdevice.c')
-rw-r--r-- | src/net/netdevice.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/net/netdevice.c b/src/net/netdevice.c index f43ca8a4..ee0d0b72 100644 --- a/src/net/netdevice.c +++ b/src/net/netdevice.c @@ -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 ), |