From: Alexander Marx Date: Fri, 21 Mar 2014 11:54:12 +0000 (+0100) Subject: Firewall: Allow DNAT with target firewall X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=commitdiff_plain;h=896eb2d69354221b2a13770b60a61c5b454126a7 Firewall: Allow DNAT with target firewall --- diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index d69d8217f..164e7cbac 100644 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -584,8 +584,10 @@ sub checktarget } } }else{ - $errormessage=$Lang::tr{'fwdfw dnat error'}."
"; - return $errormessage; + if ($fwdfwsettings{'grp2'} ne 'ipfire'){ + $errormessage=$Lang::tr{'fwdfw dnat error'}."
"; + return $errormessage; + } } } if ($fwdfwsettings{'tgt_addr'} eq $fwdfwsettings{$fwdfwsettings{'grp2'}} && $fwdfwsettings{'tgt_addr'} ne ''){ @@ -2564,8 +2566,7 @@ END my @src_addresses=&fwlib::get_addresses(\%$hash,$key,'src'); my @nat_ifaces; foreach my $val (@src_addresses){ - my ($ip,$sub)=split("/",$val); - push (@nat_ifaces,&fwlib::get_nat_address($$hash{$key}[29],$ip)); + push (@nat_ifaces,&fwlib::get_nat_address($$hash{$key}[29],$val)); } @nat_ifaces=&del_double(@nat_ifaces); $natstring = join(', ', @nat_ifaces);