Date: Wed, 29 Oct 2025 08:22:13 +0100 (CET) Message-Id: <202510290722.59T7MDNM048860@...2054...> From: Gert Doering In-Reply-To: <20251029065316.10182-1-gert@...1296...> References: <20251029065316.10182-1-gert@...1296...> Subject: [Openvpn-devel] [PATCH applied] Re: Fix logic when pushed cipher triggers tun reopen and ignore more options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Arne Schwabe Cc: openvpn-devel@lists.sourceforge.net So there was a bit of discussion about this in gerrit, and the logic is confusing and twisted. The tun device needs to reopened on a cipher change *if* the tun-mtu ("ifconfig tun0 mtu 1400") could change - and if the config has tun_mtu_defined, the tun MTU is fixed, so the cipher could be ignored. I think there are still funny edge cases (like "no tun-mtu or link-mtu defined", what then?) and the check maybe should be double-checked for "if (!opt->ce.link_mtu_defined)" - because "link-mtu " is the trigger for "tun mtu ", so in that case we can't skip this. OTOH, this is a small edge of an edge case, namely "cipher *change* upon reconnect", which is rare enough - so for this to make a real difference you need --user nobody or windows-dco (so "reopen tun" would fail) *and* a cipher change. I have changed the Reported-by:/Found-by: tags to look "like on the last few commits", so it's consistent (basically adding URL and full name). Your patch has been applied to the master branch. commit 911a69dc1af20bc54557a208b6fd4e76261b2bb2 Author: Arne Schwabe Date: Wed Oct 29 07:53:10 2025 +0100 Fix logic when pushed cipher triggers tun reopen and ignore more options Signed-off-by: Arne Schwabe Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1321 Message-Id: <20251029065316.10182-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg33989.html Signed-off-by: Gert Doering -- kind regards, Gert Doering