|
@@ -9,6 +9,7 @@
|
9
|
9
|
#include <ipxe/xfer.h>
|
10
|
10
|
#include <ipxe/open.h>
|
11
|
11
|
#include <ipxe/uri.h>
|
|
12
|
+#include <ipxe/netdevice.h>
|
12
|
13
|
#include <ipxe/udp.h>
|
13
|
14
|
|
14
|
15
|
/** @file
|
|
@@ -197,7 +198,8 @@ static int udp_tx ( struct udp_connection *udp, struct io_buffer *iobuf,
|
197
|
198
|
int rc;
|
198
|
199
|
|
199
|
200
|
/* Check we can accommodate the header */
|
200
|
|
- if ( ( rc = iob_ensure_headroom ( iobuf, UDP_MAX_HLEN ) ) != 0 ) {
|
|
201
|
+ if ( ( rc = iob_ensure_headroom ( iobuf,
|
|
202
|
+ MAX_LL_NET_HEADER_LEN ) ) != 0 ) {
|
201
|
203
|
free_iob ( iobuf );
|
202
|
204
|
return rc;
|
203
|
205
|
}
|
|
@@ -361,13 +363,13 @@ static struct io_buffer * udp_xfer_alloc_iob ( struct udp_connection *udp,
|
361
|
363
|
size_t len ) {
|
362
|
364
|
struct io_buffer *iobuf;
|
363
|
365
|
|
364
|
|
- iobuf = alloc_iob ( UDP_MAX_HLEN + len );
|
|
366
|
+ iobuf = alloc_iob ( MAX_LL_NET_HEADER_LEN + len );
|
365
|
367
|
if ( ! iobuf ) {
|
366
|
368
|
DBGC ( udp, "UDP %p cannot allocate buffer of length %zd\n",
|
367
|
369
|
udp, len );
|
368
|
370
|
return NULL;
|
369
|
371
|
}
|
370
|
|
- iob_reserve ( iobuf, UDP_MAX_HLEN );
|
|
372
|
+ iob_reserve ( iobuf, MAX_LL_NET_HEADER_LEN );
|
371
|
373
|
return iobuf;
|
372
|
374
|
}
|
373
|
375
|
|