aboutsummaryrefslogtreecommitdiff
path: root/src/openvpn/proto.h
diff options
context:
space:
mode:
authorArne Schwabe2021-12-14 16:09:01 +0100
committerGert Doering2021-12-30 16:35:31 +0100
commitd4458eed0c3cf582f787893f033a19cb4629cd76 (patch)
tree38d8559eaaaaae6cdf8da79848de67f453365af0 /src/openvpn/proto.h
parentde018b5e93d6a85f39e5e8ecd3c986320fde8a2f (diff)
downloadopenvpn-d4458eed0c3cf582f787893f033a19cb4629cd76.zip
openvpn-d4458eed0c3cf582f787893f033a19cb4629cd76.tar.gz
Decouple MSS fix calculation from frame calculation
This consolidates the MSS fix calculation into a single function instead having it distributed all over the code. It also calculates the real wire overhead without extra sizes for buffer etc. Patch v2: improve comment Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: Frank Lichtenheld <frank@lichtenheld.com> Message-Id: <20211214150901.4118886-1-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23423.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/proto.h')
-rw-r--r--src/openvpn/proto.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/openvpn/proto.h b/src/openvpn/proto.h
index f73e50c..94010a9 100644
--- a/src/openvpn/proto.h
+++ b/src/openvpn/proto.h
@@ -248,17 +248,6 @@ struct ip_tcp_udp_hdr {
}
/*
- * We are in a "liberal" position with respect to MSS,
- * i.e. we assume that MSS can be calculated from MTU
- * by subtracting out only the IP and TCP header sizes
- * without options.
- *
- * (RFC 879, section 7).
- */
-#define MTU_TO_MSS(mtu) (mtu - sizeof(struct openvpn_iphdr) \
- - sizeof(struct openvpn_tcphdr))
-
-/*
* This returns an ip protocol version of packet inside tun
* and offset of IP header (via parameter).
*/