]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ovpnmain.cgi: Update status extraction for Connection Status
authorAdolf Belka <adolf.belka@ipfire.org>
Sat, 11 Apr 2026 11:45:32 +0000 (13:45 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 13 Apr 2026 09:12:20 +0000 (09:12 +0000)
- 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>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/ovpnmain.cgi

index 3fb356acd2c1d6291830bee0c3695d7717bc8a02..ab91eec570fec74255c160734ffbb3a2c11bf62c 100644 (file)
@@ -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];