]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[netdevice] Allow driver to preinitialise the link-layer address
authorMichael Brown <mcb30@ipxe.org>
Fri, 28 Oct 2011 21:32:33 +0000 (22:32 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 28 Oct 2011 21:32:33 +0000 (22:32 +0100)
commit4f4369064b8ab1adee411f61f3cc24bd18c0d9a2
treeee5d9542a49f07c3adc6b0a4b846440506568a03
parentb0d65b5f0c93e276895e94d81362e63d3432521e
[netdevice] Allow driver to preinitialise the link-layer address

Drivers are currently expected to initialise only the hardware
address, with the link-layer protocol code taking care of converting
this into a valid link-layer address.  Some drivers (e.g. undinet) can
legitimately determine both the hardware and link-layer addresses,
which may differ.

Allow for this situation by checking to see if the link-layer address
is empty before initialising it from the hardware address.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/net/netdevice.c