[7/7] ovpnmain.cgi: Update status extraction for Connection Status

Message ID 20260411114532.43348-7-adolf.belka@ipfire.org
State Staged
Commit 5c2c41e236b5cfc8dc4ad1c74718178451afb7a0
Headers
Series [1/7] openvpn: Update to version 2.7.1 |

Commit Message

Adolf Belka 11 Apr 2026, 11:45 a.m. UTC
- The format of the connection status has changed and this change ensures that the
   status is correctly shown in the Connection Status and Control table

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 html/cgi-bin/ovpnmain.cgi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
index 3fb356acd..ab91eec57 100644
--- a/html/cgi-bin/ovpnmain.cgi
+++ b/html/cgi-bin/ovpnmain.cgi
@@ -5314,8 +5314,8 @@  END
 			foreach my $line (@status) {
 				chomp($line);
 
-				if ($line =~ /^(.+),(\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/) {
-					my @match = split(m/^(.+),(\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/, $line);
+				if ($line =~ /^(.+),(.+\:\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/) {
+					my @match = split(m/^(.+),(.+\:\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/, $line);
 
 					if ($match[1] ne "Common Name") {
 						$cn = $match[1];