mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
Firewall: when DNAT external port is given and dest port is empty, theres now an errormessage displayed
This commit is contained in:
committed by
Michael Tremer
parent
a8b113e73d
commit
3c037075d0
@@ -729,8 +729,11 @@ sub checkrule
|
||||
{
|
||||
#check valid port for NAT
|
||||
if($fwdfwsettings{'USE_NAT'} eq 'ON'){
|
||||
#if no port is given in nat area, take target host port
|
||||
#if no dest port is given in nat area, take target host port
|
||||
if($fwdfwsettings{'nat'} eq 'dnat' && $fwdfwsettings{'grp3'} eq 'TGT_PORT' && $fwdfwsettings{'dnatport'} eq ''){$fwdfwsettings{'dnatport'}=$fwdfwsettings{'TGT_PORT'};}
|
||||
if($fwdfwsettings{'TGT_PORT'} eq ''){
|
||||
$errormessage=$Lang::tr{'fwdfw dnat porterr2'};
|
||||
}
|
||||
#check if port given in nat area is a single valid port or portrange
|
||||
if($fwdfwsettings{'nat'} eq 'dnat' && $fwdfwsettings{'TGT_PORT'} ne '' && !&check_natport($fwdfwsettings{'dnatport'})){
|
||||
$errormessage=$Lang::tr{'fwdfw target'}.": ".$Lang::tr{'fwdfw dnat porterr'}."<br>";
|
||||
|
||||
Reference in New Issue
Block a user