public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
* [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 4e8949e8177a13dde72946ea9d02d0c12badafe0
@ 2015-10-18 18:21 git
  0 siblings, 0 replies; only message in thread
From: git @ 2015-10-18 18:21 UTC (permalink / raw)
  To: ipfire-scm

[-- Attachment #1: Type: text/plain, Size: 5291 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  4e8949e8177a13dde72946ea9d02d0c12badafe0 (commit)
       via  6be114f03a12086211234c05a4f7801416488c67 (commit)
       via  307327a946be2782f1858f30953d6a2fefc847d1 (commit)
       via  8b7417c50b8d3de46003bd40d779bef222dc4171 (commit)
      from  924f5d6f1aa07d92f3a946e29f4208593a0fe4d2 (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 4e8949e8177a13dde72946ea9d02d0c12badafe0
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Sun Oct 18 19:20:18 2015 +0100

    core95: Ship changed routing.cgi file
    
    Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>

commit 6be114f03a12086211234c05a4f7801416488c67
Author: Alexander Marx <alexander.marx(a)ipfire.org>
Date:   Sat Oct 17 19:27:03 2015 +0200

    BUG10941: fix single ip-addresses when no subnet given
    
    Some functions when adding a new route where senseless.
    Now the ip address is checked and in case of a missing / wrong
    subnetmask an errormessage is raised. The ip address is preserved.
    ELSE
    we convert the subnetmask to cidr notation and calculate the network ip
    correctly.
    
    Signed-off-by: Alexander Marx <alexander.marx(a)ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>

commit 307327a946be2782f1858f30953d6a2fefc847d1
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Sun Oct 18 19:19:31 2015 +0100

    core95: Ship changed firewall.cgi file
    
    Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>

commit 8b7417c50b8d3de46003bd40d779bef222dc4171
Author: Alexander Marx <alexander.marx(a)ipfire.org>
Date:   Sat Oct 17 18:32:10 2015 +0200

    BUG10806: fix wrong customhostgroupcheck
    
    The function to check for valid hostgroup entries not only
    checked the target hostgroup but also the source hostgroup if any.
    This lead to the error.
    Now the check only affects target hostgroups because it does not matter if a sourcegroup contains mac addresses.
    
     Signed-off-by: Alexander Marx <alexander.marx(a)ipfire.org>
    
    Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>

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

Summary of changes:
 config/rootfiles/core/95/filelists/files |  2 ++
 html/cgi-bin/firewall.cgi                |  2 +-
 html/cgi-bin/routing.cgi                 | 12 ++++++++----
 3 files changed, 11 insertions(+), 5 deletions(-)

Difference in files:
diff --git a/config/rootfiles/core/95/filelists/files b/config/rootfiles/core/95/filelists/files
index 8bdc0eb..7ee6f0a 100644
--- a/config/rootfiles/core/95/filelists/files
+++ b/config/rootfiles/core/95/filelists/files
@@ -4,8 +4,10 @@ etc/rc.d/init.d/firewall
 lib/udev/network-hotplug-vlan
 lib/udev/rules.d/60-net.rules
 srv/web/ipfire/cgi-bin/connections.cgi
+srv/web/ipfire/cgi-bin/firewall.cgi
 srv/web/ipfire/cgi-bin/logs.cgi/firewalllogcountry.dat
 srv/web/ipfire/cgi-bin/pppsetup.cgi
+srv/web/ipfire/cgi-bin/routing.cgi
 srv/web/ipfire/cgi-bin/vpnmain.cgi
 usr/lib/firewall/firewall-lib.pl
 usr/lib/firewall/ipsec-block
diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi
index c207ec7..682c285 100644
--- a/html/cgi-bin/firewall.cgi
+++ b/html/cgi-bin/firewall.cgi
@@ -597,7 +597,7 @@ sub checktarget
 		&General::readhasharray("$confighost", \%customhost);
 		foreach my $grpkey (sort keys %customgrp){
 			foreach my $hostkey (sort keys %customhost){
-				if ($customgrp{$grpkey}[2] eq $customhost{$hostkey}[0] && $customhost{$hostkey}[1] eq 'mac'){
+				if ($customgrp{$grpkey}[2] eq $customhost{$hostkey}[0] && $customgrp{$grpkey}[2] eq $fwdfwsettings{$fwdfwsettings{'grp2'}} && $customhost{$hostkey}[1] eq 'mac'){
 					$hint=$Lang::tr{'fwdfw hint mac'};
 					return $hint;
 				}
diff --git a/html/cgi-bin/routing.cgi b/html/cgi-bin/routing.cgi
index c460a74..2c60f67 100644
--- a/html/cgi-bin/routing.cgi
+++ b/html/cgi-bin/routing.cgi
@@ -118,12 +118,16 @@ if ($settings{'ACTION'} eq $Lang::tr{'toggle enable disable'}) {
 }
 
 if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
-	# Convert subnet masks to CIDR notation.
-	$settings{'IP'} = &General::iporsubtocidr($settings{'IP'});
 
-# Validate inputs
-	if (( !&General::validip($settings{'IP'})) and ( !&General::validipandmask($settings{'IP'}))){
+	# Validate inputs
+	if (!&General::validipandmask($settings{'IP'}))){
 	$errormessage = $Lang::tr{'invalid ip'}." / ".$Lang::tr{'invalid netmask'};
+	}else{
+		#set networkip if not already correctly defined
+		my($ip,$cidr) = split(/\//,$settings{'IP'});
+		$cidr = &General::iporsubtocidr($cidr);
+		my $netip=&General::getnetworkip($ip,$cidr);
+		$settings{'IP'} = "$netip/$cidr";
 	}
 
 	if ($settings{'IP'} =~ /^0\.0\.0\.0/){


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

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

only message in thread, other threads:[~2015-10-18 18:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-18 18:21 [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 4e8949e8177a13dde72946ea9d02d0c12badafe0 git

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