]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/vpnmain.cgi
Show better connection information for on-demand IPsec connections
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / vpnmain.cgi
index b6469c03c21af879524e99c25def5f0eca28ebd8..f4eccb1f0ef9c985f7fab7ae8f8616a48435dd0b 100644 (file)
@@ -413,6 +413,12 @@ sub writeipsecfiles {
                        print CONF "\trightsourceip=$lvpnsettings{'RW_NET'}\n";
                } else {
                        print CONF "\tauto=$start_action\n";
+
+                       # If in on-demand mode, we terminate the tunnel
+                       # after 15 min of no traffic
+                       if ($start_action eq 'route') {
+                               print CONF "\tinactivity=900\n";
+                       }
                }
 
                # Fragmentation
@@ -2799,6 +2805,9 @@ END
                ($line =~ /$confighash{$key}[1]\{.*INSTALLED/)) {
                        $col1="bgcolor='${Header::colourgreen}'";
                        $active = "<b><font color='#FFFFFF'>$Lang::tr{'capsopen'}</font></b>";
+               } elsif ($line =~ /$confighash{$key}[1]\{.*ROUTED/) {
+                       $col1="bgcolor='${Header::colourorange}'";
+                       $active = "<b><font color='#FFFFFF'>$Lang::tr{'vpn on-demand'}</font></b>";
                }
        }
        # move to blue if really down