This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via 18837a6a35f7b4d08aa12432f493f777c8713adb (commit) from 8ba4babb91510aa5473929fc9aa28a4e271301cd (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 18837a6a35f7b4d08aa12432f493f777c8713adb Author: Alfred Haas alfred.haas@ipfire.org Date: Wed Sep 7 19:27:46 2011 +0200
Updates :D
-----------------------------------------------------------------------
Summary of changes: html/cgi-bin/ovpnmain.cgi | 66 ++++++++++++++++++++++++++++++++------------- 1 files changed, 47 insertions(+), 19 deletions(-)
Difference in files: diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 4409f77..db2f2c1 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -2549,7 +2549,8 @@ if ($confighash{$cgiparams{'KEY'}}) {
} elsif ($cgiparams{'ACTION'} eq $Lang::tr{'save'}) { $cgiparams{'REMARK'} = &Header::cleanhtml($cgiparams{'REMARK'}); - if ($cgiparams{'TYPE'} !~ /^(host|net)$/) { + + if ($cgiparams{'TYPE'} !~ /^(host|net)$/) { $errormessage = $Lang::tr{'connection type is invalid'}; if ($cgiparams{'TYPE'} eq 'net') { unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'NAME'}.conf") or die "Removing Configfile fail: $!"; @@ -3026,6 +3027,33 @@ if ($cgiparams{'TYPE'} eq 'net') { $confighash{$key}[31] = $cgiparams{'MTU'}; # new fileds &General::writehasharray("${General::swroot}/ovpn/ovpnconfig", %confighash); + +### +# m.a.d n2n begin +### + + if ($cgiparams{'TYPE'} eq 'net') { + + if (-e "/var/run/$confighash{$key}[1]n2n.pid") { + system('/usr/local/bin/openvpnctrl', '-kn2n', $confighash{$cgiparams{'KEY'}}[1]); + + &General::readhasharray("${General::swroot}/ovpn/ovpnconfig", %confighash); + my $key = $cgiparams{'KEY'}; + if (! $key) { + $key = &General::findhasharraykey (%confighash); + foreach my $i (0 .. 31) { $confighash{$key}[$i] = "";} + } + $confighash{$key}[0] = 'on'; + &General::writehasharray("${General::swroot}/ovpn/ovpnconfig", %confighash); + + system('/usr/local/bin/openvpnctrl', '-sn2n', $confighash{$cgiparams{'KEY'}}[1]); + } + } + +### +# m.a.d n2n end +### + if ($cgiparams{'EDIT_ADVANCED'} eq 'on') { $cgiparams{'KEY'} = $key; $cgiparams{'ACTION'} = $Lang::tr{'advanced'}; @@ -3699,24 +3727,24 @@ END ###
if ($confighash{$key}[3] eq 'net') { - my @tempovpnsubnet = split("/",$confighash{$key}[27]); - my @ovpnip = split /./,$tempovpnsubnet[0]; - my $pingip = ""; - - if ($confighash{$key}[6] eq 'server') { - $pingip = "$ovpnip[0].$ovpnip[1].$ovpnip[2].2"; - } else { - $pingip = "$ovpnip[0].$ovpnip[1].$ovpnip[2].1"; - } - - my $p = Net::Ping->new("udp",1); - - if ($p->ping($pingip)) { - $active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourgreen}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsopen'}</font></b></td></tr></table>"; - } - $p->close(); - - } +# my @tempovpnsubnet = split("/",$confighash{$key}[27]); +# my @ovpnip = split /./,$tempovpnsubnet[0]; +# my $pingip = ""; +# if ($confighash{$key}[6] eq 'server') { +# $pingip = "$ovpnip[0].$ovpnip[1].$ovpnip[2].2"; +# } else { +# $pingip = "$ovpnip[0].$ovpnip[1].$ovpnip[2].1"; +# } +# my $p = Net::Ping->new("udp",1); +# if ($p->ping($pingip)) { +# $active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourgreen}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsopen'}</font></b></td></tr></table>"; +# } +# $p->close(); + + if (-e "/var/run/$confighash{$key}[1]n2n.pid") { + $active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourgreen}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsopen'}</font></b></td></tr></table>"; + } + }
my $cn; my @match = ();
hooks/post-receive -- IPFire 2.x development tree