Fix connection.cgi display for strongswan.
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 27 Mar 2010 21:17:04 +0000 (22:17 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 27 Mar 2010 21:17:04 +0000 (22:17 +0100)
html/cgi-bin/connections.cgi

index 9cf4f68..b370d12 100644 (file)
@@ -57,7 +57,7 @@ if (open(IP, "${General::swroot}/red/local-ipaddress")) {
         push(@colour, ${Header::colourfw} );
 }
 
-my @vpn = ` route -n | grep ipsec | awk '{ print \$1" "\$3}'`;
+my @vpn = `grep "rightsubnet=" /etc/ipsec.conf | cut -f2 -d"=" | sed "s|/| |g"`;
   foreach my $route (@vpn) {
                 chomp($route);
                 my @temp = split(/[\t ]+/, $route);