mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 09:32:33 +03:00
[tcp] Allow sufficient headroom for TCP headers
TCP currently neglects to allow sufficient space for its own headers when allocating I/O buffers. This problem is masked by the fact that the maximum link-layer header size (802.11) is substantially larger than the common Ethernet link-layer header. Fix by allowing sufficient space for any TCP headers, as well as the network-layer and link-layer headers. Reported-by: Scott K Logan <logans@cottsay.net> Debugged-by: Scott K Logan <logans@cottsay.net> Tested-by: Scott K Logan <logans@cottsay.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -308,6 +308,16 @@ struct tcp_options {
|
||||
*/
|
||||
#define TCP_MSL ( 2 * 60 * TICKS_PER_SEC )
|
||||
|
||||
/**
|
||||
* TCP maximum header length
|
||||
*
|
||||
*/
|
||||
#define TCP_MAX_HEADER_LEN \
|
||||
( MAX_LL_NET_HEADER_LEN + \
|
||||
sizeof ( struct tcp_header ) + \
|
||||
sizeof ( struct tcp_mss_option ) + \
|
||||
sizeof ( struct tcp_timestamp_padded_option ) )
|
||||
|
||||
/**
|
||||
* Compare TCP sequence numbers
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user