* [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 910209a1e506e2ca70083ba02d3fd2bf1f8fbbc2
@ 2013-04-29 8:23 git
0 siblings, 0 replies; only message in thread
From: git @ 2013-04-29 8:23 UTC (permalink / raw)
To: ipfire-scm
[-- Attachment #1: Type: text/plain, Size: 4594 bytes --]
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(a)ipfire.org>
Date: Mon Apr 29 10:22:29 2013 +0200
Add ovpnmain.cgi to core update 68.
commit ab4cf06cff961d50dbe1ac5ff37d1aaa6299e8a6
Author: Alexander Marx <amarx(a)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(a)ipfire.org> #
+# Copyright (C) 2007-2013 IPFire Team <info(a)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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-04-29 8:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-29 8:23 [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 910209a1e506e2ca70083ba02d3fd2bf1f8fbbc2 git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox