public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. ac2f710771ba327b5b8fd1b8f3829b977d08aa24
Date: Thu, 03 Jan 2013 10:55:33 +0100	[thread overview]
Message-ID: <20130103095533.51C2920142@argus.ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 4429 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  ac2f710771ba327b5b8fd1b8f3829b977d08aa24 (commit)
       via  f7e3d2080b044e7ecd70c20c1e9a96ea11cc529c (commit)
      from  6201ce613a2d2bceaf9bce3305de292f658e2fe0 (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 ac2f710771ba327b5b8fd1b8f3829b977d08aa24
Author: Alexander Marx <amarx(a)ipfire.org>
Date:   Thu Jan 3 06:36:33 2013 +0100

    OpenVPN CCD: Fixes Bug when editing an IPsec Net, the ipcheck did not return a ipsecnet name.

commit f7e3d2080b044e7ecd70c20c1e9a96ea11cc529c
Author: Alexander Marx <amarx(a)ipfire.org>
Date:   Thu Jan 3 06:15:27 2013 +0100

    OpenVPN CCD: Bugfix: when editing an IPsec Net, the ipcheck produces an error.

-----------------------------------------------------------------------

Summary of changes:
 config/cfgroot/general-functions.pl | 29 +++++------------------------
 1 file changed, 5 insertions(+), 24 deletions(-)

Difference in files:
diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl
index c14f990..f94cdbf 100644
--- a/config/cfgroot/general-functions.pl
+++ b/config/cfgroot/general-functions.pl
@@ -401,7 +401,6 @@ sub validipandmask
 
 sub checksubnets
 {
-	
 	my %ccdconfhash=();			
 	my @ccdconf=();				
 	my $ccdname=$_[0];			
@@ -409,20 +408,16 @@ sub checksubnets
 	my $errormessage;
 	my ($ip,$cidr)=split(/\//,$ccdnet);
 	$cidr=&iporsubtocidr($cidr);
-	
-	
 	#get OVPN-Subnet (dynamic range)
 	my %ovpnconf=();
 	&readhash("${General::swroot}/ovpn/settings", \%ovpnconf);
 	my ($ovpnip,$ovpncidr)= split (/\//,$ovpnconf{'DOVPN_SUBNET'});
 	$ovpncidr=&iporsubtocidr($ovpncidr);
-	
 	#check if we try to use same network as ovpn server
 	if ("$ip/$cidr" eq "$ovpnip/$ovpncidr") {
 			$errormessage=$errormessage.$Lang::tr{'ccd err isovpnnet'}."<br>";
 			return $errormessage;
 	}
-		
 	#check if we use a network-name/subnet that already exists
 	&readhasharray("${General::swroot}/ovpn/ccd.conf", \%ccdconfhash);
 	foreach my $key (keys %ccdconfhash) {
@@ -438,33 +433,22 @@ sub checksubnets
 			$errormessage=$errormessage.$Lang::tr{'ccd err issubnet'}."<br>";
 			return $errormessage;
 		}
-			
 	}
-	#check if we use a name which is already used by ovpn
-	
-	
-	
-	
-	
 	#check if we use a ipsec right network which is already defined
 	my %ipsecconf=();
 	&General::readhasharray("${General::swroot}/vpn/config", \%ipsecconf);
 	foreach my $key (keys %ipsecconf){
 		if ($ipsecconf{$key}[11] ne ''){
-			#$errormessage="DRIN!";
-			#return $errormessage;
-			
 			my ($ipsecip,$ipsecsub) = split (/\//, $ipsecconf{$key}[11]);
 			$ipsecsub=&iporsubtodec($ipsecsub);
-			
-			if ( &IpInSubnet ($ip,$ipsecip,$ipsecsub) ){
-				$errormessage=$Lang::tr{'ccd err isipsecnet'}." Name:  $ipsecconf{$key}[2]";
-				return $errormessage;
+			if($ipsecconf{$key}[1] ne $ccdname){
+				if ( &IpInSubnet ($ip,$ipsecip,$ipsecsub) ){
+					$errormessage=$Lang::tr{'ccd err isipsecnet'}." Name:  $ipsecconf{$key}[1]";
+					return $errormessage;
+				}
 			}
 		}
 	}
-	
-		
 	#check if we use one of ipfire's networks (green,orange,blue)
 	my %ownnet=();
 	&readhash("${General::swroot}/ethernet/settings", \%ownnet);
@@ -472,9 +456,6 @@ sub checksubnets
 	if (($ownnet{'ORANGE_NETADDRESS'}	ne '' && $ownnet{'ORANGE_NETADDRESS'} 	ne '0.0.0.0') && &IpInSubnet($ownnet{'ORANGE_NETADDRESS'},$ip,&iporsubtodec($cidr))){ $errormessage=$Lang::tr{'ccd err orange'};return $errormessage;}
 	if (($ownnet{'BLUE_NETADDRESS'} 	ne '' && $ownnet{'BLUE_NETADDRESS'} 	ne '0.0.0.0') && &IpInSubnet($ownnet{'BLUE_NETADDRESS'},$ip,&iporsubtodec($cidr))){ $errormessage=$Lang::tr{'ccd err blue'};return $errormessage;}
 	if (($ownnet{'RED_NETADDRESS'} 		ne '' && $ownnet{'RED_NETADDRESS'} 		ne '0.0.0.0') && &IpInSubnet($ownnet{'RED_NETADDRESS'},$ip,&iporsubtodec($cidr))){ $errormessage=$Lang::tr{'ccd err red'};return $errormessage;}
-	
-	
-
 }
 
 


hooks/post-receive
--
IPFire 2.x development tree

                 reply	other threads:[~2013-01-03  9:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130103095533.51C2920142@argus.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox