From: Adolf Belka <adolf.belka@ipfire.org>
To: development@lists.ipfire.org
Cc: Adolf Belka <adolf.belka@ipfire.org>
Subject: [PATCH 5/7] ovpnmain.cgi: Change status extraction for RW connection statistics page
Date: Sat, 11 Apr 2026 13:45:30 +0200 [thread overview]
Message-ID: <20260411114532.43348-5-adolf.belka@ipfire.org> (raw)
In-Reply-To: <20260411114532.43348-1-adolf.belka@ipfire.org>
- The format of the status file has changed in 2.7.0
- This patch changes the regex to extract requyired status to maintain the same status
output
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
html/cgi-bin/ovpnmain.cgi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
index b0d950cbb..def043d9b 100644
--- a/html/cgi-bin/ovpnmain.cgi
+++ b/html/cgi-bin/ovpnmain.cgi
@@ -3178,8 +3178,8 @@ END
@match = split(/^Updated,(.+)/, $line);
$status = $match[1];
- } elsif ( $line =~ /^(.+),(\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/) {
- @match = split(m/^(.+),(\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/, $line);
+ } elsif ( $line =~ /^(.+),(.+\:\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/) {
+ @match = split(m/^(.+),(.+\:\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/, $line);
# Skip the header
next if ($match[1] eq "Common Name");
@@ -3196,8 +3196,8 @@ END
$users[$uid]{'Country'} = &Location::Functions::lookup_country_code($address);
$uid++;
- } elsif ($line =~ /^(\d+\.\d+\.\d+\.\d+),(.+),(\d+\.\d+\.\d+\.\d+\:\d+),(.+)/) {
- @match = split(m/^(\d+\.\d+\.\d+\.\d+),(.+),(\d+\.\d+\.\d+\.\d+\:\d+),(.+)/, $line);
+ } elsif ($line =~ /^(\d+\.\d+\.\d+\.\d+),(.+),(.+\:\d+\.\d+\.\d+\.\d+\:\d+),(.+)/) {
+ @match = split(m/^(\d+\.\d+\.\d+\.\d+),(.+),(.+\:\d+\.\d+\.\d+\.\d+\:\d+),(.+)/, $line);
# Skip the header
next if ($match[1] eq "Virtual Address");
--
2.53.0
next prev parent reply other threads:[~2026-04-11 11:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-11 11:45 [PATCH 1/7] openvpn: Update to version 2.7.1 Adolf Belka
2026-04-11 11:45 ` [PATCH 2/7] core202: Ship openvpn Adolf Belka
2026-04-11 11:45 ` [PATCH 3/7] core202: Ship ovpnmain.cgi Adolf Belka
2026-04-11 11:45 ` [PATCH 4/7] ovpnmain.cgi: Display only IP for Real Address in Connection Statistics Page Adolf Belka
2026-04-11 11:45 ` Adolf Belka [this message]
2026-04-11 11:45 ` [PATCH 6/7] ovpnmain.cgi: remove persist-key as this is now default Adolf Belka
2026-04-11 11:45 ` [PATCH 7/7] ovpnmain.cgi: Update status extraction for Connection Status Adolf Belka
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=20260411114532.43348-5-adolf.belka@ipfire.org \
--to=adolf.belka@ipfire.org \
--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