From mboxrd@z Thu Jan 1 00:00:00 1970 From: git@ipfire.org To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 910209a1e506e2ca70083ba02d3fd2bf1f8fbbc2 Date: Mon, 29 Apr 2013 10:23:04 +0200 Message-ID: <20130429082305.F291A20135@argus.ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2340248426407828070==" List-Id: --===============2340248426407828070== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 910209a1e506e2ca70083ba02d3fd2bf1f8fbbc2 (commit) via ab4cf06cff961d50dbe1ac5ff37d1aaa6299e8a6 (commit) from 9a883f3f53819fcf0f7de3c6596451cfbc3bcd60 (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 910209a1e506e2ca70083ba02d3fd2bf1f8fbbc2 Author: Michael Tremer Date: Mon Apr 29 10:22:29 2013 +0200 Add ovpnmain.cgi to core update 68. commit ab4cf06cff961d50dbe1ac5ff37d1aaa6299e8a6 Author: Alexander Marx Date: Sun Apr 28 05:47:50 2013 +0200 OpenVPN: Bugfix 10357, now when chaning an VPN N2N or editing an old one = the ports are checked. ----------------------------------------------------------------------- Summary of changes: config/rootfiles/core/68/filelists/files | 1 + html/cgi-bin/ovpnmain.cgi | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) Difference in files: diff --git a/config/rootfiles/core/68/filelists/files b/config/rootfiles/core= /68/filelists/files index ad6864a..bfd6746 100644 --- a/config/rootfiles/core/68/filelists/files +++ b/config/rootfiles/core/68/filelists/files @@ -2,6 +2,7 @@ etc/system-release etc/issue etc/modprobe.d/blacklist srv/web/ipfire/cgi-bin/connections.cgi +srv/web/ipfire/cgi-bin/ovpnmain.cgi srv/web/ipfire/cgi-bin/services.cgi srv/web/ipfire/html/themes/ipfire/include/style.css srv/web/ipfire/html/themes/ipfire/include/functions.pl diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index cbaecd9..1cfade6 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -2,7 +2,7 @@ ############################################################################= ### # = # # IPFire.org - A linux based firewall = # -# Copyright (C) 2007-2011 IPFire Team = # +# Copyright (C) 2007-2013 IPFire Team = # # = # # This program is free software: you can redistribute it and/or modify = # # it under the terms of the GNU General Public License as published by = # @@ -3498,18 +3498,25 @@ if ($cgiparams{'TYPE'} eq 'host') { ### =20 if ($cgiparams{'TYPE'} eq 'net') { - =09 - if ($cgiparams{'DEST_PORT'} eq $vpnsettings{'DDEST_PORT'}) { + if ($cgiparams{'DEST_PORT'} eq $vpnsettings{'DDEST_PORT'}) { $errormessage =3D $Lang::tr{'openvpn destination port used'}; unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'N= AME'}.conf") or die "Removing Configfile fail: $!"; rmdir ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}") || die "Re= moving Directory fail: $!"; goto VPNCONF_ERROR; =09 } - =20 - if ($cgiparams{'DEST_PORT'} eq '') { + #Bugfix 10357 + foreach my $key (sort keys %confighash){ + if ( ($confighash{$key}[22] eq $cgiparams{'DEST_PORT'} && $cgiparams{'NAME= '} ne $confighash{$key}[1]) || ($confighash{$key}[29] eq $cgiparams{'DEST_POR= T'} && $cgiparams{'NAME'} ne $confighash{$key}[1])){ $errormessage =3D $Lang::tr{'openvpn destination port used'}; unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'N= AME'}.conf") or die "Removing Configfile fail: $!"; rmdir ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}") || die "Re= moving Directory fail: $!"; + goto VPNCONF_ERROR;=09 + } + } + if ($cgiparams{'DEST_PORT'} eq '') { + $errormessage =3D $Lang::tr{'invalid port'}; + unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'N= AME'}.conf") or die "Removing Configfile fail: $!"; + rmdir ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}") || die "Re= moving Directory fail: $!"; goto VPNCONF_ERROR; =09 } =20 @@ -3920,7 +3927,7 @@ if ($cgiparams{'TYPE'} eq 'net') { } } =20 - # Save the config + # Save the config my $key =3D $cgiparams{'KEY'}; =09 if (! $key) { hooks/post-receive -- IPFire 2.x development tree --===============2340248426407828070==--