]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
IPsec: Show connected status for waiting connections that are active
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 23 Aug 2018 16:34:50 +0000 (17:34 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 23 Aug 2018 16:34:50 +0000 (17:34 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/core/124/filelists/files
html/cgi-bin/index.cgi
html/cgi-bin/vpnmain.cgi

index ebebccdc112d18e885ac462f3659cada57937bc3..eeb9048d974f3e10e99da17649ecd5a9bca7ff7a 100644 (file)
@@ -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
index ef9da2389b41de4277f2d633ab9e4e19ba15fd80..03dc3574d00f3a2b5f17d9e75026d2017b17cca6 100644 (file)
@@ -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'};
                                                }
                                        }
                                }
index e557122dffa271c60bc5e2ffceb8c96552612433..21fd1f4cd6061c80ddb2067527427122c7e348d1 100644 (file)
@@ -2844,8 +2844,11 @@ END
        }
        print "<td align='center' $col>$confighash{$key}[25]</td>";
        my $col1="bgcolor='${Header::colourred}'";
-       # get real state
        my $active = "<b><font color='#FFFFFF'>$Lang::tr{'capsclosed'}</font></b>";
+       if ($confighash{$key}[33] eq "add") {
+               $col1="bgcolor='${Header::colourorange}'";
+               $active = "<b><font color='#FFFFFF'>$Lang::tr{'vpn wait'}</font></b>";
+       }
        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 = "<b><font color='#FFFFFF'>$Lang::tr{'vpn on-demand'}</font></b>";
-               } elsif ($confighash{$key}[33] eq "add") {
-                       $col1="bgcolor='${Header::colourorange}'";
-                       $active = "<b><font color='#FFFFFF'>$Lang::tr{'vpn wait'}</font></b>";
                }
        }
        # move to blue if really down