aboutsummaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2012-08-29 23:34:14 +0100
committerMichael Brown <mcb30@ipxe.org>2012-08-31 21:22:59 +0100
commit03f0c23f8b1a60575f788dd1b9d4ea47debf2345 (patch)
tree60b2312a0d56d6707a25aef4ce5bb4f6874359d6 /src/arch
parentf54a61e43450fae7d045bebabc4c368d325e71d3 (diff)
downloadipxe-03f0c23f8b1a60575f788dd1b9d4ea47debf2345.zip
ipxe-03f0c23f8b1a60575f788dd1b9d4ea47debf2345.tar.gz
ipxe-03f0c23f8b1a60575f788dd1b9d4ea47debf2345.tar.bz2
[ipoib] Expose Ethernet-compatible eIPoIB link-layer addresses and headers
Almost all clients of the raw-packet interfaces (UNDI and SNP) can handle only Ethernet link layers. Expose an Ethernet-compatible link layer to local clients, while remaining compatible with IPoIB on the wire. This requires manipulation of ARP (but not DHCP) packets within the IPoIB driver. This is ugly, but it's the only viable way to allow IPoIB devices to be driven via the raw-packet interfaces. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/interface/pxe/pxe_undi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/arch/i386/interface/pxe/pxe_undi.c b/src/arch/i386/interface/pxe/pxe_undi.c
index f9282db..5d21226 100644
--- a/src/arch/i386/interface/pxe/pxe_undi.c
+++ b/src/arch/i386/interface/pxe/pxe_undi.c
@@ -358,7 +358,8 @@ pxenv_undi_transmit ( struct s_PXENV_UNDI_TRANSMIT *undi_transmit ) {
}
/* Allocate and fill I/O buffer */
- iobuf = alloc_iob ( MAX_LL_HEADER_LEN + len );
+ iobuf = alloc_iob ( MAX_LL_HEADER_LEN +
+ ( ( len > IOB_ZLEN ) ? len : IOB_ZLEN ) );
if ( ! iobuf ) {
DBGC2 ( &pxe_netdev, " could not allocate iobuf\n" );
undi_transmit->Status = PXENV_STATUS_OUT_OF_RESOURCES;