> Arne Schwabe <a...@rfc2549.org> hat am 11.05.2022 13:08 geschrieben:
>
>
> Currently control packet size is controlled by tun-mtu in a very
> non-obvious way since the control overhead is not taken into account
> and control channel packet will end up with a different size than
> data channel packet.
>
> Instead we decouple this and introduce tls-mtu which defaults to
> 1250.
>
> Patch v2: rebase on latest patch set
> Patch v3: Introduce TLS_CHANNEL_MTU_MIN define and give explaination
> of its value.
"explanation"
>
> Signed-off-by: Arne Schwabe <a...@rfc2549.org>
> ---
> Changes.rst | 8 ++++++++
> doc/man-sections/link-options.rst | 7 +++++++
> src/openvpn/common.h | 10 ++++++++++
> src/openvpn/init.c | 8 ++++++--
> src/openvpn/mtu.h | 5 +++++
> src/openvpn/options.c | 14 ++++++++++++++
> src/openvpn/options.h | 1 +
> src/openvpn/ssl.c | 25 +++++++++++++------------
> src/openvpn/ssl.h | 8 +++-----
> 9 files changed, 67 insertions(+), 19 deletions(-)
>
[...]
> diff --git a/src/openvpn/common.h b/src/openvpn/common.h
> index b94680885..056c25438 100644
> --- a/src/openvpn/common.h
> +++ b/src/openvpn/common.h
> @@ -68,6 +68,16 @@ typedef unsigned long ptr_type;
> */
> #define TLS_CHANNEL_BUF_SIZE 2048
>
> +/* TLS control buffer minimum size, this size is not actually inherent to
> + * the protocol but. Our current sending window is 6 and the receive window
Maybe "the protocol. However, our" ?
> + * is 8 or 12 depending on the OpenVPN version. We need to be able to send
> + * a TLS record of size TLS_CHANNEL_BUF_SIZE. Splitting this into more than
> + * 6 packets (with overhead) would complicate our sending logic a lot more,
> so
> + * we settle here for a "round" number that allow with overhead of ~100 bytes
remove "allow"
> + * to be larger than TLS_CHANNEL_BUF_SIZE. E.g. 6x ~400 > 2048.
"to be" -> "is"
> + * */
> +#define TLS_CHANNEL_MTU_MIN 512
> +
> /*
> * This parameter controls the maximum size of a bundle
> * of pushed options.
[...]
Regards,
--
Frank Lichtenheld
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel