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

[-- Attachment #1: Type: text/plain, Size: 7414 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  9cf4a7f4188a5e68fc3daaf26661205ea3b69629 (commit)
       via  1a2bc2b8539bc6a7ab1eba66f275f75c46e2a0fb (commit)
       via  d6c50a8591b20d21ef7ab15fa25926958bf9a9d3 (commit)
       via  72cf6056006137be50c8ffcb083a4d2696c0590b (commit)
       via  ceb78c46f3795e699af21fdd84289e78d7dda9a1 (commit)
       via  29f238b239b1a038a8d6541c98969f90f7a1274d (commit)
      from  8bc689164ed8e1f2cab5e9690f78f0c744a7a5e2 (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 9cf4a7f4188a5e68fc3daaf26661205ea3b69629
Merge: 1a2bc2b 72cf605
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Sat Jul 5 22:44:10 2014 +0200

    Merge remote-tracking branch 'stevee/tor-update' into next

commit 1a2bc2b8539bc6a7ab1eba66f275f75c46e2a0fb
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Sat Jul 5 22:43:23 2014 +0200

    core80: Add changed CGI files.

commit d6c50a8591b20d21ef7ab15fa25926958bf9a9d3
Merge: 8bc6891 ceb78c4
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Sat Jul 5 22:42:32 2014 +0200

    Merge remote-tracking branch 'amarx/10538' into next

commit 72cf6056006137be50c8ffcb083a4d2696c0590b
Author: Stefan Schantl <stefan.schantl(a)ipfire.org>
Date:   Sat Jul 5 15:20:02 2014 +0200

    tor: Update to 0.2.4.22.

commit ceb78c46f3795e699af21fdd84289e78d7dda9a1
Author: Alexander Marx <alexander.marx(a)ipfire.org>
Date:   Mon Jun 16 11:48:18 2014 +0200

    ovpnmain.cgi: Sortorder clientstatus and control - Type, Name

commit 29f238b239b1a038a8d6541c98969f90f7a1274d
Author: Alexander Marx <alexander.marx(a)ipfire.org>
Date:   Mon Jun 16 09:45:59 2014 +0200

    BUG 10538: Routes may only added once and should not be part of an internal network

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

Summary of changes:
 config/cfgroot/general-functions.pl      | 13 +++++++++++++
 config/rootfiles/core/80/filelists/files |  2 ++
 html/cgi-bin/ovpnmain.cgi                |  2 +-
 html/cgi-bin/routing.cgi                 | 21 +++++++++++++++++++++
 lfs/tor                                  |  6 +++---
 5 files changed, 40 insertions(+), 4 deletions(-)

Difference in files:
diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl
index 6fabf1c..1ef014a 100644
--- a/config/cfgroot/general-functions.pl
+++ b/config/cfgroot/general-functions.pl
@@ -598,6 +598,19 @@ sub checksubnets
 	if (($ownnet{'RED_NETADDRESS'} 		ne '' && $ownnet{'RED_NETADDRESS'} 		ne '0.0.0.0') && &IpInSubnet($ip,$ownnet{'RED_NETADDRESS'},&iporsubtodec($ownnet{'RED_NETMASK'}))){ $errormessage=$Lang::tr{'ccd err red'};return $errormessage;}
 }
 
+sub check_net_internal{
+	my $network=shift;
+	my ($ip,$cidr)=split(/\//,$network);
+	my %ownnet=();
+	my $errormessage;
+	$cidr=&iporsubtocidr($cidr);
+	#check if we use one of ipfire's networks (green,orange,blue)
+	&readhash("${General::swroot}/ethernet/settings", \%ownnet);
+	if (($ownnet{'GREEN_NETADDRESS'}  	ne '' && $ownnet{'GREEN_NETADDRESS'} 	ne '0.0.0.0') && &IpInSubnet($ip,$ownnet{'GREEN_NETADDRESS'},&iporsubtodec($ownnet{'GREEN_NETMASK'}))){ $errormessage=$Lang::tr{'ccd err green'};return $errormessage;}
+	if (($ownnet{'ORANGE_NETADDRESS'}	ne '' && $ownnet{'ORANGE_NETADDRESS'} 	ne '0.0.0.0') && &IpInSubnet($ip,$ownnet{'ORANGE_NETADDRESS'},&iporsubtodec($ownnet{'ORANGE_NETMASK'}))){ $errormessage=$Lang::tr{'ccd err orange'};return $errormessage;}
+	if (($ownnet{'BLUE_NETADDRESS'} 	ne '' && $ownnet{'BLUE_NETADDRESS'} 	ne '0.0.0.0') && &IpInSubnet($ip,$ownnet{'BLUE_NETADDRESS'},&iporsubtodec($ownnet{'BLUE_NETMASK'}))){ $errormessage=$Lang::tr{'ccd err blue'};return $errormessage;}
+	if (($ownnet{'RED_NETADDRESS'} 		ne '' && $ownnet{'RED_NETADDRESS'} 		ne '0.0.0.0') && &IpInSubnet($ip,$ownnet{'RED_NETADDRESS'},&iporsubtodec($ownnet{'RED_NETMASK'}))){ $errormessage=$Lang::tr{'ccd err red'};return $errormessage;}
+}
 
 sub validport
 {
diff --git a/config/rootfiles/core/80/filelists/files b/config/rootfiles/core/80/filelists/files
index 4d242b6..3ea7ee2 100644
--- a/config/rootfiles/core/80/filelists/files
+++ b/config/rootfiles/core/80/filelists/files
@@ -1,6 +1,8 @@
 etc/system-release
 etc/issue
 etc/rc.d/init.d/dhcrelay
+srv/web/ipfire/cgi-bin/ovpnmain.cgi
+srv/web/ipfire/cgi-bin/routing.cgi
 usr/local/bin/setddns.pl
 usr/sbin/dhcrelay
 var/ipfire/general-functions.pl
diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
index b2ce05e..0cb4169 100644
--- a/html/cgi-bin/ovpnmain.cgi
+++ b/html/cgi-bin/ovpnmain.cgi
@@ -5041,7 +5041,7 @@ END
 	my $id = 0;
 	my $gif;
 	my $col1="";
-	foreach my $key (sort { ncmp ($confighash{$a}[1],$confighash{$b}[1]) } keys %confighash) {
+	foreach my $key (sort { ncmp ($confighash{$a}[3],$confighash{$b}[3]) } sort { ncmp ($confighash{$a}[1],$confighash{$b}[1]) } keys %confighash) {
 	if ($confighash{$key}[0] eq 'on') { $gif = 'on.gif'; } else { $gif = 'off.gif'; }
 	if ($id % 2) {
 		print "<tr>";
diff --git a/html/cgi-bin/routing.cgi b/html/cgi-bin/routing.cgi
index 5798fb8..c460a74 100644
--- a/html/cgi-bin/routing.cgi
+++ b/html/cgi-bin/routing.cgi
@@ -134,6 +134,27 @@ if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
 	$errormessage = $Lang::tr{'invalid ip'}. " - ".$Lang::tr{'gateway ip'};
 	}
 
+	#set networkip if not already correctly defined
+	my($ip,$cidr) = split(/\//,$settings{'IP'});
+	my $netip=&General::getnetworkip($ip,$cidr);
+	$settings{'IP'} = "$netip/$cidr";
+
+	#Check for already existing routing entry
+	foreach my $line (@current) {
+		chomp($line);				# remove newline
+		my @temp=split(/\,/,$line);
+		$temp[2] ='' unless defined $temp[2]; # not always populated
+		$temp[3] ='' unless defined $temp[2]; # not always populated
+		#Same ip already used?
+		if($temp[1] eq $settings{'IP'}){
+			$errormessage = $Lang::tr{'ccd err irouteexist'};
+			last;
+		}
+		#Is the network part of an internal network?
+		$errormessage .= &General::check_net_internal($settings{'IP'});
+		last;
+	}
+
     unless ($errormessage) {
 	if ($settings{'KEY1'} eq '') { #add or edit ?
 	    unshift (@current, "$settings{'EN'},$settings{'IP'},$settings{'GATEWAY'},$settings{'REMARK'}\n");
diff --git a/lfs/tor b/lfs/tor
index 7956736..6f9e502 100644
--- a/lfs/tor
+++ b/lfs/tor
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = 0.2.4.20
+VER        = 0.2.4.22
 
 THISAPP    = tor-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -32,7 +32,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = tor
-PAK_VER    = 6
+PAK_VER    = 7
 
 DEPS       = "libevent2"
 
@@ -44,7 +44,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = a8cd8e3b3a3f6a7770f2c22d280f19b8
+$(DL_FILE)_MD5 = 5a7eee0d9df87233255d78b25c6f8270
 
 install : $(TARGET)
 


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

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

only message in thread, other threads:[~2014-07-05 20:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-05 20:46 [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 9cf4a7f4188a5e68fc3daaf26661205ea3b69629 git

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