| Message ID | 20261027222110.2642078-1-antonio@mandelbit.com |
|---|---|
| Headers |
Return-Path: <development+bounces-2932-patchwork=ipfire.org@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail01.haj.ipfire.org", Issuer "YR1" (not verified)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4jDlMX3MfNz3xX7 for <patchwork@web04.haj.ipfire.org>; Tue, 27 Oct 2026 22:21:28 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [IPv6:2001:678:b28::201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail02.haj.ipfire.org", Issuer "YE2" (not verified)) by mail01.ipfire.org (Postfix) with ESMTPS id 4jDlMW2Ztyz6Yb for <patchwork@ipfire.org>; Tue, 27 Oct 2026 22:21:27 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4jDlMV2bLGz34p5 for <patchwork@ipfire.org>; Tue, 27 Oct 2026 22:21:26 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail01.haj.ipfire.org", Issuer "YR1" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4jDlMG4cMCz2xHk for <development@lists.ipfire.org>; Tue, 27 Oct 2026 22:21:14 +0000 (UTC) Received: from mout-b-112.mailbox.org (mout-b-112.mailbox.org [195.10.208.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bit raw public key) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.mailbox.org", Issuer "Thawte TLS RSA CA G1" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4jDlMF5l5qz3Gb for <development@lists.ipfire.org>; Tue, 27 Oct 2026 22:21:13 +0000 (UTC) Authentication-Results: mail01.ipfire.org; dkim=pass header.d=mandelbit.com header.s=MBO0001 header.b=pS935Fka; spf=pass (mail01.ipfire.org: domain of antonio@mandelbit.com designates 195.10.208.42 as permitted sender) smtp.mailfrom=antonio@mandelbit.com; dmarc=none ARC-Seal: i=1; a=rsa-sha256; d=lists.ipfire.org; s=202003rsa; cv=none; t=1793139673; b=pThL7xptDG1pZkQ0D3/T6hZqfoJsq7FlE1gSM+Z99zaQwPnxwjiM02kTIuaqGBhOE/XanZ rZh4cRI8wM3n9hQ22y3Lrl7tZHZia3ksDm2ml0h3/C0gPlXLncsX6FWZny4teYIiY+B9V4 OpPFu4Nw7CO6JyR90aMDPEvHEXPgVTLqq5SICShgLYjVh3D2AoKQWZRS5A48vq6IDH6uaV ZMV944i3m/EnPa5CNg09Udj+DwhYuagd0U6+VVPDaegJOEn0nWltrrupjgCnpn/k5ZUXZv qik6qXTbpAOrv2JRT37JY9oRTgI77+9FkJH1jJz4JGP7NdUjDY1DakzyacjKKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1793139673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=dddRkmH5TzGjQjE4DQRE8j/1HvnyHJA1GEF6DJxNraU=; b=JIWNANKjQubxL3G2+hgPsYffQyPSCgpL6P0MPHBD2HaCl5S/1uOiBb0C//Ak6WnR3AyVeL 0a3KsNwDejoOB7NzXE3QM1aoKyi5vYKQCGncMxPBsfhDUSUNT6ShBT4a9tLkoXE3y/w2N+ t5fKYRhYz1/m722TuxAmL3XU2RDLUxVR+VcHw4E3iJ2WbUSUfnfywZfWxWQLXDEtTUJQ04 cpxYw6U6dLRjctTY/RPacQRhlnALA+XalD2WPgO5z3Lomc6HK5g/rMznpEbQrLdmzpXarC US+VB6Pm+645VbfWED545gxJWGOyINFT5CRmLYvWz/oaXiFu6pOkUn39iGUePg== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=mandelbit.com header.s=MBO0001 header.b=pS935Fka; spf=pass (mail01.ipfire.org: domain of antonio@mandelbit.com designates 195.10.208.42 as permitted sender) smtp.mailfrom=antonio@mandelbit.com; dmarc=none Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-112.mailbox.org (Postfix) with ESMTPS id 4jDlMF0hnjz5x8d; Tue, 27 Oct 2026 23:21:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1793139673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=dddRkmH5TzGjQjE4DQRE8j/1HvnyHJA1GEF6DJxNraU=; b=pS935FkabtrqKXweZm8EU+79Dhv1ZOc4XJJCzujmropC4St/kHwI5DDV3ALvKAJZSy/LBr KKwCrajbDzDYAqKTdrMqfUMD6p5ZkVux7BoiO0UNM3kk7WW1QOeieUxCL8hFI7ZrsTIE6t gPunjAyvpsY6yOcwYpGC5cgPvr2oO2QSfB5SifygPOJDaW93VUOjZpt7HMssuF1H8zKRXZ rm3KU6FN4Dyi3eRXgy6xvu6iG828R9RLU0UNoHc7yE4Iz6JNLrlK61924nJSchyv5T0QXJ 6+VQk3irBMPc86jUKRn3tUokAfd7cfU43hz7YYOZsvh9TvvUqjHXlPBEMrJgYg== From: Antonio Quartulli <antonio@mandelbit.com> To: development@lists.ipfire.org Cc: Antonio Quartulli <antonio@mandelbit.com> Subject: [PATCH 0/3] OpenVPN: Fix N2N connections shown as DISCONNECTED while up Date: Tue, 27 Oct 2026 23:21:07 +0100 Message-ID: <20261027222110.2642078-1-antonio@mandelbit.com> X-Mailer: git-send-email 2.55.0 Precedence: list List-Id: <development.lists.ipfire.org> List-Subscribe: <https://lists.ipfire.org/>, <mailto:development+subscribe@lists.ipfire.org?subject=subscribe> List-Unsubscribe: <https://lists.ipfire.org/>, <mailto:development+unsubscribe@lists.ipfire.org?subject=unsubscribe> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development+help@lists.ipfire.org?subject=help> Sender: <development@lists.ipfire.org> Mail-Followup-To: <development@lists.ipfire.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Action: no action X-Spamd-Result: default: False [-2.30 / 11.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; RCVD_IN_DNSWL_LOW(-0.20)[2001:67c:2050:b231:465::1:received,195.10.208.42:from]; R_SPF_ALLOW(-0.20)[+ip4:195.10.208.0/24:c]; R_DKIM_ALLOW(-0.10)[mandelbit.com:s=MBO0001]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.10)[mxext2.mailbox.org]; R_DKIM_ALIGNED(-0.10)[strict]; ASN(0.00)[asn:199118, ipnet:195.10.208.0/24, country:DE]; RCVD_COUNT_ONE(0.00)[1]; TO_DN_SOME(0.00)[]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; IP_REPUTATION_HAM(0.00)[asn: 199118(-0.31), country: DE(-0.01), ip: 195.10.208.42(0.00)]; DMARC_NA(0.00)[mandelbit.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_REPUTATION(0.00)[0]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[mandelbit.com:+] X-Rspamd-Server: mail01.haj.ipfire.org X-Rspamd-Queue-Id: 4jDlMF5l5qz3Gb |
| Series |
OpenVPN: Fix N2N connections shown as DISCONNECTED while up
|
|
Message
Antonio Quartulli
27 Oct 2026, 10:21 p.m. UTC
Hi all! This is my first contribution to IPFire, so bear with me if I am doing things the wrong way :) This is what this small series addresses: In P2P mode OpenVPN leaves its management state at AUTH/WAIT when a new session attempt never completes (e.g. a stray packet from the internet), although the tunnel keeps working. The WUI then shows the N2N connection as DISCONNECTED (bug #13897). A fix for OpenVPN has already been published for review [1], but it is not integrated yet. These patches fix IPFire while OpenVPN still misbehaves. A test harness is included to verify the fix and possibly perform regression testing in the future. Notes: - index.cgi and ovpnmain.cgi now require the new /var/ipfire/ovpn-functions.pl, so it needs to be shipped with the next Core Update. I left the filelists to you. - wio.cgi (WIO addon) still uses the old check and has the same problem; I can send a follow-up if wanted. [1] https://gerrit.openvpn.net/c/openvpn/+/2040 Antonio Quartulli (3): ovpn-functions.pl: Add a helper to get the status of N2N connections ovpnmain.cgi/index.cgi: Use OpenVPN::n2n_status() tests: Add tests for OpenVPN::n2n_status() config/cfgroot/ovpn-functions.pl | 96 +++++++++++++++++++ config/rootfiles/common/configroot | 1 + html/cgi-bin/index.cgi | 12 +-- html/cgi-bin/ovpnmain.cgi | 58 +---------- lfs/configroot | 1 + .../ovpn-functions.pl/data/auth_pending | 6 ++ .../cfgroot/ovpn-functions.pl/data/connected | 7 ++ .../data/connected_stray_session | 8 ++ .../cfgroot/ovpn-functions.pl/data/empty | 1 + .../cfgroot/ovpn-functions.pl/data/exiting | 7 ++ .../ovpn-functions.pl/data/never_connected | 6 ++ .../ovpn-functions.pl/data/notifications | 11 +++ .../ovpn-functions.pl/data/reconnected | 11 +++ .../ovpn-functions.pl/data/reconnecting | 9 ++ .../cfgroot/ovpn-functions.pl/data/truncated | 3 + .../cfgroot/ovpn-functions.pl/n2n_status.pl | 73 ++++++++++++++ .../config/cfgroot/ovpn-functions.pl/test.sh | 70 ++++++++++++++ 17 files changed, 315 insertions(+), 65 deletions(-) create mode 100644 config/cfgroot/ovpn-functions.pl create mode 100644 tests/config/cfgroot/ovpn-functions.pl/data/auth_pending create mode 100644 tests/config/cfgroot/ovpn-functions.pl/data/connected create mode 100644 tests/config/cfgroot/ovpn-functions.pl/data/connected_stray_session create mode 100644 tests/config/cfgroot/ovpn-functions.pl/data/empty create mode 100644 tests/config/cfgroot/ovpn-functions.pl/data/exiting create mode 100644 tests/config/cfgroot/ovpn-functions.pl/data/never_connected create mode 100644 tests/config/cfgroot/ovpn-functions.pl/data/notifications create mode 100644 tests/config/cfgroot/ovpn-functions.pl/data/reconnected create mode 100644 tests/config/cfgroot/ovpn-functions.pl/data/reconnecting create mode 100644 tests/config/cfgroot/ovpn-functions.pl/data/truncated create mode 100644 tests/config/cfgroot/ovpn-functions.pl/n2n_status.pl create mode 100755 tests/config/cfgroot/ovpn-functions.pl/test.sh