]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/vpnmain.cgi
IPsec: Allow to configure a connection in waiting state
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / vpnmain.cgi
index 2a0351ea04c4f31f7b26d0d7ee3e40125f8a6f2b..eefe9759906309b6246c54fdf4066332150fcf45 100644 (file)
@@ -199,10 +199,10 @@ sub callssl ($) {
 sub getCNfromcert ($) {
        #&General::log("ipsec", "Extracting name from $_[0]...");
        my $temp = `/usr/bin/openssl x509 -text -in $_[0]`;
-       $temp =~ /Subject:.*CN=(.*)[\n]/;
+       $temp =~ /Subject:.*CN = (.*)[\n]/;
        $temp = $1;
        $temp =~ s+/Email+, E+;
-       $temp =~ s/ ST=/ S=/;
+       $temp =~ s/ ST = / S = /;
        $temp =~ s/,//g;
        $temp =~ s/\'//g;
        return $temp;
@@ -216,7 +216,7 @@ sub getsubjectfromcert ($) {
        $temp =~ /Subject: (.*)[\n]/;
        $temp = $1;
        $temp =~ s+/Email+, E+;
-       $temp =~ s/ ST=/ S=/;
+       $temp =~ s/ ST = / S = /;
        return $temp;
 }
 ###
@@ -436,12 +436,6 @@ sub writeipsecfiles {
                        if ($start_action eq 'route' && $inactivity_timeout > 0) {
                                print CONF "\tinactivity=$inactivity_timeout\n";
                        }
-
-                       # Restart the connection immediately when it has gone down
-                       # unexpectedly
-                       if ($start_action eq 'start') {
-                               print CONF "\tcloseaction=restart\n";
-                       }
                }
 
                # Fragmentation
@@ -2445,6 +2439,7 @@ if(($cgiparams{'ACTION'} eq $Lang::tr{'advanced'}) ||
        $selected{'DPD_ACTION'}{'none'} = '';
        $selected{'DPD_ACTION'}{$cgiparams{'DPD_ACTION'}} = "selected='selected'";
 
+       $selected{'START_ACTION'}{'add'} = '';
        $selected{'START_ACTION'}{'route'} = '';
        $selected{'START_ACTION'}{'start'} = '';
        $selected{'START_ACTION'}{$cgiparams{'START_ACTION'}} = "selected='selected'";
@@ -2670,6 +2665,7 @@ if(($cgiparams{'ACTION'} eq $Lang::tr{'advanced'}) ||
                        <select name="START_ACTION">
                                <option value="route" $selected{'START_ACTION'}{'route'}>$Lang::tr{'vpn start action route'}</option>
                                <option value="start" $selected{'START_ACTION'}{'start'}>$Lang::tr{'vpn start action start'}</option>
+                               <option value="add"   $selected{'START_ACTION'}{'add'}  >$Lang::tr{'vpn start action add'}</option>
                        </select>
                </td>
        </tr>
@@ -2867,6 +2863,9 @@ 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