public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
* [git.ipfire.org] IPFire 2.x development tree branch, master, updated. 9230f5a122ed5f405af2c622ef83dd60b019adda
@ 2026-12-03 22:26 Michael Tremer
  0 siblings, 0 replies; only message in thread
From: Michael Tremer @ 2026-12-03 22:26 UTC (permalink / raw)
  To: ipfire-scm

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, master has been updated
       via  9230f5a122ed5f405af2c622ef83dd60b019adda (commit)
      from  68c2394eaf44fa3c0e84061c2d49411bddc2587d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9230f5a122ed5f405af2c622ef83dd60b019adda
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Dec 3 22:26:36 2026 +0000

    wio: Fetch the state of N2N connections from the management socket
    
    The management interface of N2N connections has been moved from a TCP
    port on localhost to a UNIX socket in /var/run/openvpn, so WIO could no
    longer show whether a connection was up.
    
    Bug: #14969
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 html/cgi-bin/wio.cgi | 12 ++++++++----
 lfs/wio              |  2 +-
 2 files changed, 9 insertions(+), 5 deletions(-)

Difference in files:
diff --git a/html/cgi-bin/wio.cgi b/html/cgi-bin/wio.cgi
index dfa9827fc..4130276e8 100755
--- a/html/cgi-bin/wio.cgi
+++ b/html/cgi-bin/wio.cgi
@@ -44,6 +44,7 @@ use Socket;
 use POSIX qw(strftime);
 use File::Copy;
 use Fatal qw/ open /;
+use IO::Socket::UNIX;
 use Net::Telnet;
 
 require '/var/ipfire/general-functions.pl';
@@ -1351,11 +1352,14 @@ foreach $key (keys %ovpnconfighash) {
 		if ($ovpnconfighash{$key}[3] eq 'net') {
 			if (-e "/var/run/$ovpnconfighash{$key}[1]n2n.pid") {
 				my ( @output, @tustate ) = '';
-				my $tport = $ovpnconfighash{$key}[22];
-				my $tnet = new Net::Telnet (Timeout=>5, Errmode=>'return', Port=>$tport);
-				if ($tport ne '') {
-					$tnet->open('127.0.0.1');
+				my $tsocket = IO::Socket::UNIX->new(
+					Type => SOCK_STREAM,
+					Peer => "/var/run/openvpn/$ovpnconfighash{$key}[1]-n2n.sock",
+				);
+				if ($tsocket) {
+					my $tnet = new Net::Telnet (Fhopen=>$tsocket, Telnetmode=>0, Timeout=>5, Errmode=>'return');
 					@output = $tnet->cmd(String => 'state', Prompt => '/(END.*\n|ERROR:.*\n)/');
+					$tnet->close();
 					@tustate = split(/\,/, $output[1]);
 					$ovpntime = &WIO::contime(scalar localtime($tustate[0]), "ovpn");
 					$ovpncheck = strftime("%d.%m.%Y - %H:%M:%S", localtime);
diff --git a/lfs/wio b/lfs/wio
index 35aa6531c..955c2ee61 100644
--- a/lfs/wio
+++ b/lfs/wio
@@ -32,7 +32,7 @@ THISAPP    = wio-$(VER)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = wio
-PAK_VER    = 22
+PAK_VER    = 23
 
 DEPS       =
 


hooks/post-receive
--
IPFire 2.x development tree


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-03 22:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-03 22:26 [git.ipfire.org] IPFire 2.x development tree branch, master, updated. 9230f5a122ed5f405af2c622ef83dd60b019adda Michael Tremer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox