]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Merge branch 'dnsmasq-dnssec' into next
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 8 Jul 2014 08:52:36 +0000 (10:52 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 8 Jul 2014 08:52:36 +0000 (10:52 +0200)
config/cfgroot/general-functions.pl
config/rootfiles/core/80/filelists/files
html/cgi-bin/ovpnmain.cgi
html/cgi-bin/routing.cgi
lfs/strongswan
lfs/tor

index 6fabf1c0583a0c9c2e5fa90f4966028671dffae0..1ef014a66cf67d303f8a32cf8dd2da5786542d5a 100644 (file)
@@ -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
 {
index 4d242b6bfce350dd0abba279cce4fe13d86ce884..3ea7ee2b6bb65161367ad6065a718600ab9c8c5d 100644 (file)
@@ -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
index b2ce05e97ac8f1b75ca6d972eecb39725dbe96a9..0cb41696fb58db26c1f61368ee5595c0d8ac52b7 100644 (file)
@@ -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>";
index 5798fb89689172ccf8a8903ac1295da809616b4f..c460a74e7ca1ab56d4d2dd44f8ecc9d69f9df6c2 100644 (file)
@@ -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");
index 7448c8d2fbcd38a5cbcf1cec209e667bf84fd318..a5bda74ff2398d16b60664bd7bdc795d28040d5e 100644 (file)
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = 5.2.0dr6
+VER        = 5.2.0rc1
 
 THISAPP    = strongswan-$(VER)
 DL_FILE    = $(THISAPP).tar.bz2
@@ -48,7 +48,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 6b9ac43a3934dcdf66ccbdfebc54081b
+$(DL_FILE)_MD5 = ca260196e49ca5f15ff2507f20c4539a
 
 install : $(TARGET)
 
diff --git a/lfs/tor b/lfs/tor
index 79567366aa6b6507b2ecf0600fee2cf25f95f3fc..6f9e5028955beee3775367750d6c02b8dd5ca76f 100644 (file)
--- 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)