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 michael.tremer@ipfire.org Date: Mon Apr 29 10:22:29 2013 +0200
Add ovpnmain.cgi to core update 68.
commit ab4cf06cff961d50dbe1ac5ff37d1aaa6299e8a6 Author: Alexander Marx amarx@ipfire.org 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 info@ipfire.org # +# Copyright (C) 2007-2013 IPFire Team info@ipfire.org # # # # 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') { ###
if ($cgiparams{'TYPE'} eq 'net') { - - if ($cgiparams{'DEST_PORT'} eq $vpnsettings{'DDEST_PORT'}) { + if ($cgiparams{'DEST_PORT'} eq $vpnsettings{'DDEST_PORT'}) { $errormessage = $Lang::tr{'openvpn destination port used'}; unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'NAME'}.conf") or die "Removing Configfile fail: $!"; rmdir ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}") || die "Removing Directory fail: $!"; goto VPNCONF_ERROR; } - - 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_PORT'} && $cgiparams{'NAME'} ne $confighash{$key}[1])){ $errormessage = $Lang::tr{'openvpn destination port used'}; unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'NAME'}.conf") or die "Removing Configfile fail: $!"; rmdir ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}") || die "Removing Directory fail: $!"; + goto VPNCONF_ERROR; + } + } + if ($cgiparams{'DEST_PORT'} eq '') { + $errormessage = $Lang::tr{'invalid port'}; + unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'NAME'}.conf") or die "Removing Configfile fail: $!"; + rmdir ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}") || die "Removing Directory fail: $!"; goto VPNCONF_ERROR; }
@@ -3920,7 +3927,7 @@ if ($cgiparams{'TYPE'} eq 'net') { } }
- # Save the config + # Save the config my $key = $cgiparams{'KEY'}; if (! $key) {
hooks/post-receive -- IPFire 2.x development tree