From 12d3aa212f35b8cdd9a0ccd849b45beea46ed94d Mon Sep 17 00:00:00 2001 From: Antonio Quartulli Date: Mon, 28 Sep 2026 16:02:20 +0200 Subject: openvpn: T9364: default the MTU to 1420 when DCO is enabled The ovpn Kernel module does no MSS clamping, so with a 1500 bytes MTU full sized packets get fragmented on the underlay. Add an "mtu" node, rendered as "tun-mtu". With "offload dco" it defaults to 1420, unless a raw tun-mtu/link-mtu/udp-mtu option is present. Reject "mtu" together with such an option, below 100, and below 1280 when IPv6 runs inside the tunnel. --- data/templates/openvpn/server.conf.j2 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'data') diff --git a/data/templates/openvpn/server.conf.j2 b/data/templates/openvpn/server.conf.j2 index 999af5086..729ab7a80 100644 --- a/data/templates/openvpn/server.conf.j2 +++ b/data/templates/openvpn/server.conf.j2 @@ -52,6 +52,9 @@ compress lzo {% if offload.dco is not vyos_defined %} disable-dco {% endif %} +{% if tun_mtu is vyos_defined %} +tun-mtu {{ tun_mtu }} +{% endif %} {% if mode is vyos_defined('client') %} # -- cgit v1.2.3