public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
* [git.ipfire.org] IPFire 2.x development tree branch, next, updated. ac2f710771ba327b5b8fd1b8f3829b977d08aa24
@ 2013-01-03  9:55 git
  0 siblings, 0 replies; only message in thread
From: git @ 2013-01-03  9:55 UTC (permalink / raw)
  To: ipfire-scm

[-- 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-03  9:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-03  9:55 [git.ipfire.org] IPFire 2.x development tree branch, next, updated. ac2f710771ba327b5b8fd1b8f3829b977d08aa24 git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox