From: maniacikarus Date: Fri, 22 Jun 2007 13:24:43 +0000 (+0000) Subject: ipsecctrl gefixt und connections.cgi gefixt X-Git-Tag: v2.3-beta1~614 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=7dbf47dcc759fb8ea15923c6a7800d4ce3522722 ipsecctrl gefixt und connections.cgi gefixt git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@645 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- diff --git a/html/cgi-bin/connections.cgi b/html/cgi-bin/connections.cgi index 6295a09452..8d76a6be69 100644 --- a/html/cgi-bin/connections.cgi +++ b/html/cgi-bin/connections.cgi @@ -127,15 +127,7 @@ if (-e "${General::swroot}/ovpn/settings") { push(@masklen, $tempovpnsubnet[1]); push(@colour, ${Header::colourovpn} ); - if ( ($ovpnsettings{'ENABLED'} eq 'on') && open(IP, "${General::swroot}/red/local-ipaddress") ) { - # add RED:port / proto - my $redip = ; - close(IP); - chomp $redip; - push(@network, $redip ); - push(@masklen, '255.255.255.255' ); - push(@colour, ${Header::colourovpn} ); - } + if ( ($ovpnsettings{'ENABLED_BLUE'} eq 'on') && $netsettings{'BLUE_DEV'} ) { # add BLUE:port / proto push(@network, $netsettings{'BLUE_ADDRESS'} ); @@ -277,8 +269,10 @@ foreach my $line (@active) { my ($sip, $sport) = split(':', $temp[0]); my ($dip, $dport) = split(':', $temp[1]); my $proto = $temp[2]; - my $state = $temp[3]; - my $ttl = $temp[4]; + my $state; my $ttl; + if ( $proto eq "esp" ){$state = "";$ttl = $temp[3];} + elsif ( $proto eq "icmp" ){$state = "";$ttl = $temp[4];} + else{$state = $temp[3];$ttl = $temp[4];} next if( !( (($cgiparams{'SEE_PROTO'} eq $Lang::tr{'all'}) || ($proto eq $cgiparams{'SEE_PROTO'} )) diff --git a/src/misc-progs/ipsecctrl.c b/src/misc-progs/ipsecctrl.c index 7f332e4d91..50d49bac35 100644 --- a/src/misc-progs/ipsecctrl.c +++ b/src/misc-progs/ipsecctrl.c @@ -284,10 +284,10 @@ int main(int argc, char *argv[]) { /* Get vpnwatch pid */ if (file = fopen("/var/run/vpn-watch.pid", "r")) { - safe_system("kill -9 fd"); + safe_system("kill -9 $(cat /var/run/vpn-watch.pid)"); safe_system("unlink /var/run/vpn-watch.pid)"); } - close(fd); + close(file); /* FIXME: workaround for pclose() issue - still no real idea why * this is happening */