summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2009-06-05 02:06:07 +0200
committerMichael Brown2009-06-05 02:07:27 +0200
commitedfbd4e4fa63ded7df7232d38cfeb16bc5662f6d (patch)
tree247c7caa9bdefb24ebc96d693911f95a2485d922 /src/include
parent[script] Allow for DOS-style line endings in scripts (diff)
downloadipxe-edfbd4e4fa63ded7df7232d38cfeb16bc5662f6d.tar.gz
ipxe-edfbd4e4fa63ded7df7232d38cfeb16bc5662f6d.tar.xz
ipxe-edfbd4e4fa63ded7df7232d38cfeb16bc5662f6d.zip
[netdevice] Fix incorrect value for MAX_LL_HEADER_LEN
MAX_LL_HEADER_LEN is erroneously set to 6 rather than 14, resulting in possible data corruption whenever we send an ARP packet. Fix value and add a comment explaining why MAX_LL_ADDR_LEN is greater than MAX_LL_HEADER_LEN. Reported-by: Joshua Oreman <oremanj@rwcr.net>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/netdevice.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/include/gpxe/netdevice.h b/src/include/gpxe/netdevice.h
index a2126fac0..cfcfb7778 100644
--- a/src/include/gpxe/netdevice.h
+++ b/src/include/gpxe/netdevice.h
@@ -21,11 +21,19 @@ struct net_protocol;
struct ll_protocol;
struct device;
-/** Maximum length of a link-layer address */
+/** Maximum length of a link-layer address
+ *
+ * The longest currently-supported link-layer address is for IPoIB.
+ */
#define MAX_LL_ADDR_LEN 20
-/** Maximum length of a link-layer header */
-#define MAX_LL_HEADER_LEN 6
+/** Maximum length of a link-layer header
+ *
+ * The longest currently-supported link-layer header is for Ethernet.
+ * (The IPoIB link-layer pseudo-header doesn't actually include
+ * link-layer addresses; see ipoib.c for details).
+ */
+#define MAX_LL_HEADER_LEN 14
/** Maximum length of a network-layer address */
#define MAX_NET_ADDR_LEN 4