From: Michael Tremer Date: Thu, 23 Aug 2018 16:34:50 +0000 (+0100) Subject: IPsec: Show connected status for waiting connections that are active X-Git-Tag: v2.21-core124~50 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=aec1925bea763d7dff55ed43d26bdb06acd2e07c;ds=sidebyside IPsec: Show connected status for waiting connections that are active Signed-off-by: Michael Tremer --- diff --git a/config/rootfiles/core/124/filelists/files b/config/rootfiles/core/124/filelists/files index ebebccdc11..eeb9048d97 100644 --- a/config/rootfiles/core/124/filelists/files +++ b/config/rootfiles/core/124/filelists/files @@ -6,6 +6,8 @@ etc/rc.d/init.d/localnet etc/rc.d/init.d/partresize srv/web/ipfire/cgi-bin/firewall.cgi srv/web/ipfire/cgi-bin/ids.cgi +srv/web/ipfire/cgi-bin/index.cgi +srv/web/ipfire/cgi-bin/vpnmain.cgi usr/bin/install-bootloader usr/local/bin/backupiso var/ipfire/backup/exclude diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index ef9da2389b..03dc3574d0 100644 --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -465,6 +465,10 @@ END my $activecolor = $Header::colourred; my $activestatus = $Lang::tr{'capsclosed'}; + if ($vpnconfig{$key}[33] eq "add") { + $activecolor = ${Header::colourorange}; + $activestatus = $Lang::tr{'vpn wait'}; + } if ($vpnconfig{$key}[0] eq 'off') { $activecolor = $Header::colourblue; $activestatus = $Lang::tr{'capsclosed'}; @@ -479,9 +483,6 @@ END } elsif ($line =~ /$vpnconfig{$key}[1]\{.*ROUTED/) { $activecolor = $Header::colourorange; $activestatus = $Lang::tr{'vpn on-demand'}; - } elsif ($vpnconfig{$key}[33] eq "add") { - $activecolor = ${Header::colourorange}; - $activestatus = $Lang::tr{'vpn wait'}; } } } diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index e557122dff..21fd1f4cd6 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -2844,8 +2844,11 @@ END } print "$confighash{$key}[25]"; my $col1="bgcolor='${Header::colourred}'"; - # get real state my $active = "$Lang::tr{'capsclosed'}"; + if ($confighash{$key}[33] eq "add") { + $col1="bgcolor='${Header::colourorange}'"; + $active = "$Lang::tr{'vpn wait'}"; + } foreach my $line (@status) { if (($line =~ /\"$confighash{$key}[1]\".*IPsec SA established/) || ($line =~ /$confighash{$key}[1]\{.*INSTALLED/)) { @@ -2857,9 +2860,6 @@ END } elsif ($line =~ /$confighash{$key}[1]\{.*ROUTED/) { $col1="bgcolor='${Header::colourorange}'"; $active = "$Lang::tr{'vpn on-demand'}"; - } elsif ($confighash{$key}[33] eq "add") { - $col1="bgcolor='${Header::colourorange}'"; - $active = "$Lang::tr{'vpn wait'}"; } } # move to blue if really down