diff options
| author | Michael Brown | 2014-03-04 14:14:13 +0100 |
|---|---|---|
| committer | Michael Brown | 2014-03-04 14:23:29 +0100 |
| commit | e191298a1d62446646922b1f3d899dfb16da73ff (patch) | |
| tree | 45aed089b8aafd2efd15d2171e314cee37eb1302 /src/include/ipxe | |
| parent | [tcpip] Provide tcpip_mtu() to determine the maximum transmission unit (diff) | |
| download | ipxe-e191298a1d62446646922b1f3d899dfb16da73ff.tar.gz ipxe-e191298a1d62446646922b1f3d899dfb16da73ff.tar.xz ipxe-e191298a1d62446646922b1f3d899dfb16da73ff.zip | |
[tcp] Calculate correct MSS from peer address
iPXE currently advertises a fixed MSS of 1460, which is correct only
for IPv4 over Ethernet. For IPv6 over Ethernet, the value should be
1440 (allowing for the larger IPv6 header). For non-Ethernet link
layers, the value should reflect the MTU of the underlying network
device.
Use tcpip_mtu() to calculate the transport-layer MTU associated with
the peer address, and calculate the MSS to allow for an optionless TCP
header as per RFC 6691.
As a side benefit, we can now fail a connection immediately with a
meaningful error message if we have no route to the destination
address.
Reported-by: Anton D. Kachalov <mouse@yandex-team.ru>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
| -rw-r--r-- | src/include/ipxe/tcp.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/include/ipxe/tcp.h b/src/include/ipxe/tcp.h index eb4b7b222..9baa6391c 100644 --- a/src/include/ipxe/tcp.h +++ b/src/include/ipxe/tcp.h @@ -330,16 +330,6 @@ struct tcp_options { #define TCP_PATH_MTU \ ( 1280 - 40 /* IPv6 */ - 20 /* TCP */ - 12 /* TCP timestamp */ ) -/** - * Advertised TCP MSS - * - * We currently hardcode this to a reasonable value and hope that the - * sender uses path MTU discovery. The alternative is breaking the - * abstraction layer so that we can find out the MTU from the IP layer - * (which would have to find out from the net device layer). - */ -#define TCP_MSS 1460 - /** TCP maximum segment lifetime * * Currently set to 2 minutes, as per RFC 793. |
