diff options
author | Arne Schwabe | 2021-12-30 18:21:36 +0100 |
---|---|---|
committer | Gert Doering | 2021-12-31 12:08:35 +0100 |
commit | 01b7cd44669896d91696e936cc38a2f57bc6081e (patch) | |
tree | e5590dd6fc8a97c18ccbe063b1ad98c62265881d /src/openvpn/mtu.h | |
parent | d4458eed0c3cf582f787893f033a19cb4629cd76 (diff) | |
download | openvpn-01b7cd44669896d91696e936cc38a2f57bc6081e.zip openvpn-01b7cd44669896d91696e936cc38a2f57bc6081e.tar.gz |
Rework occ link-mtu calculation
Use the functions that directly compute the link mtu instead relying on the
frame logic.
Patch V2: rebase on master
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20211230172136.2017215-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/search?l=mid&q=20211230172136.2017215-1-arne@rfc2549.org
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/mtu.h')
-rw-r--r-- | src/openvpn/mtu.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/openvpn/mtu.h b/src/openvpn/mtu.h index ae83d3e..f601386 100644 --- a/src/openvpn/mtu.h +++ b/src/openvpn/mtu.h @@ -280,6 +280,17 @@ frame_calculate_protocol_header_size(const struct key_type *kt, unsigned int payload_size, bool occ); +/** + * Calculate the link-mtu to advertise to our peer. The actual value is not + * relevant, because we will possibly perform data channel cipher negotiation + * after this, but older clients will log warnings if we do not supply them the + * value they expect. This assumes that the traditional cipher/auth directives + * in the config match the config of the peer. + */ +size_t +calc_options_string_link_mtu(const struct options *options, + const struct frame *frame); + /* * frame_set_mtu_dynamic and flags */ |