From bbe8e009b824aef745c9ab9718dce9a1b557f5fc Mon Sep 17 00:00:00 2001 From: Alexander Marx Date: Thu, 15 Sep 2016 15:31:48 +0200 Subject: [PATCH] BUG11184: Error if DNAT address ends with 0 or 255 now disabled When using dnat addresses, it is possible to use big subnets and host addresses like 172.16.0.0/12. These addresses where rejected because it was recognised as network address. The check is now removed. Signed-off-by: Alexander Marx Signed-off-by: Michael Tremer --- html/cgi-bin/firewall.cgi | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index 8007182e9d..face0f4609 100644 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -539,16 +539,6 @@ sub checktarget #check DNAT settings (has to be single Host and single Port or portrange) if ($fwdfwsettings{'USE_NAT'} eq 'ON' && $fwdfwsettings{'nat'} eq 'dnat'){ if($fwdfwsettings{'grp2'} eq 'tgt_addr' || $fwdfwsettings{'grp2'} eq 'cust_host_tgt' || $fwdfwsettings{'grp2'} eq 'ovpn_host_tgt'){ - #check if manual ip is a single Host (if set) - if ($fwdfwsettings{'grp2'} eq 'tgt_addr'){ - my @tmp= split (/\./,$fwdfwsettings{$fwdfwsettings{'grp2'}}); - my @tmp1= split ("/",$tmp[3]); - if (($tmp1[0] eq "0") || ($tmp1[0] eq "255")) - { - $errormessage=$Lang::tr{'fwdfw dnat error'}."
"; - return $errormessage; - } - } #check if Port is a single Port or portrange if ($fwdfwsettings{'nat'} eq 'dnat' && $fwdfwsettings{'grp3'} eq 'TGT_PORT'){ if(($fwdfwsettings{'PROT'} ne 'TCP'|| $fwdfwsettings{'PROT'} ne 'UDP') && $fwdfwsettings{'TGT_PORT'} eq ''){ -- 2.39.2