- 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(-)
@@ -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");