public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <20261027222110.2642078-1-antonio@mandelbit.com> (raw)

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

-- 
2.55.0



             reply	other threads:[~2026-10-27 22:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 22:21 Antonio Quartulli [this message]
2026-10-27 22:21 ` [PATCH 1/3] ovpn-functions.pl: Add a helper to get the status of N2N connections Antonio Quartulli
2026-10-27 22:21 ` [PATCH 2/3] ovpnmain.cgi/index.cgi: Use OpenVPN::n2n_status() Antonio Quartulli
2026-10-27 22:21 ` [PATCH 3/3] tests: Add tests for OpenVPN::n2n_status() Antonio Quartulli
2026-10-28 17:28 ` [PATCH 0/3] OpenVPN: Fix N2N connections shown as DISCONNECTED while up Michael Tremer
2026-10-28 19:20   ` Antonio Quartulli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261027222110.2642078-1-antonio@mandelbit.com \
    --to=antonio@mandelbit.com \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox