mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
BUG12479: Copied NAT rule in Firewall displays incorrect source Port
Fixes: #12479 When copying a NAT rule in the firewall the existing sourceport is copied, too. This Fix deletes the sourceport from a copied NAT rule. After Saving, the correct port is used. Signed-off-by: Alexander Marx <alexander.marx@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
9f75f3b430
commit
284bf12c58
@@ -1552,6 +1552,11 @@ sub newrule
|
|||||||
$fwdfwsettings{'USE_NAT'} = $hash{$key}[28];
|
$fwdfwsettings{'USE_NAT'} = $hash{$key}[28];
|
||||||
$fwdfwsettings{'nat'} = $hash{$key}[31]; #changed order
|
$fwdfwsettings{'nat'} = $hash{$key}[31]; #changed order
|
||||||
$fwdfwsettings{$fwdfwsettings{'nat'}} = $hash{$key}[29];
|
$fwdfwsettings{$fwdfwsettings{'nat'}} = $hash{$key}[29];
|
||||||
|
#Fix BUG 12479
|
||||||
|
#When copying a DNAT Rule, the sourceport has to be empty at this point.
|
||||||
|
if($hash{$key}[14] eq 'cust_srv' and $hash{$key}[31] eq 'dnat'){
|
||||||
|
$hash{$key}[30] = '';
|
||||||
|
}
|
||||||
$fwdfwsettings{'dnatport'} = $hash{$key}[30];
|
$fwdfwsettings{'dnatport'} = $hash{$key}[30];
|
||||||
$fwdfwsettings{'LIMIT_CON_CON'} = $hash{$key}[32];
|
$fwdfwsettings{'LIMIT_CON_CON'} = $hash{$key}[32];
|
||||||
$fwdfwsettings{'concon'} = $hash{$key}[33];
|
$fwdfwsettings{'concon'} = $hash{$key}[33];
|
||||||
|
|||||||
Reference in New Issue
Block a user