mirror of https://github.com/ipxe/ipxe.git
[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>pull/1/head
parent
4c5f00f879
commit
edfbd4e4fa
|
@ -21,11 +21,19 @@ struct net_protocol;
|
||||||
struct ll_protocol;
|
struct ll_protocol;
|
||||||
struct device;
|
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
|
#define MAX_LL_ADDR_LEN 20
|
||||||
|
|
||||||
/** Maximum length of a link-layer header */
|
/** Maximum length of a link-layer header
|
||||||
#define MAX_LL_HEADER_LEN 6
|
*
|
||||||
|
* 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 */
|
/** Maximum length of a network-layer address */
|
||||||
#define MAX_NET_ADDR_LEN 4
|
#define MAX_NET_ADDR_LEN 4
|
||||||
|
|
Loading…
Reference in New Issue