@@ -1789,7 +1789,8 @@ function filter_nat_rules_generate(&$FilterIflist)
...
@@ -1789,7 +1789,8 @@ function filter_nat_rules_generate(&$FilterIflist)
if($srcaddr<>""&&$dstaddr<>""&&$natif){
if($srcaddr<>""&&$dstaddr<>""&&$natif){
$natrules.="{$nordr}rdr {$rdrpass}on {$natif}{$address_family} proto {$protocol} from {$srcaddr} to {$dstaddr}".($nordr==""?" -> {$target}{$localport}":"");
$protocol_keyword=!empty($protocol)?"proto":"";
$natrules.="{$nordr}rdr {$rdrpass}on {$natif}{$address_family}{$protocol_keyword}{$protocol} from {$srcaddr} to {$dstaddr}".($nordr==""?" -> {$target}{$localport}":"");
/* Does this rule redirect back to a internal host? */
/* Does this rule redirect back to a internal host? */
@@ -1812,7 +1813,8 @@ function filter_nat_rules_generate(&$FilterIflist)
...
@@ -1812,7 +1813,8 @@ function filter_nat_rules_generate(&$FilterIflist)
$rdr_if_list="{ {$rdr_if_list} }";
$rdr_if_list="{ {$rdr_if_list} }";
}
}
$natrules.="\n# Reflection redirect\n";
$natrules.="\n# Reflection redirect\n";
$natrules.="{$nordr}rdr {$rdrpass}on {$rdr_if_list}{$address_family} proto {$protocol} from {$srcaddr} to {$dstaddr_reflect}".($nordr==""?" -> {$target}{$localport}":"");
$protocol_keyword=!empty($protocol)?"proto":"";
$natrules.="{$nordr}rdr {$rdrpass}on {$rdr_if_list}{$address_family}{$protocol_keyword}{$protocol} from {$srcaddr} to {$dstaddr_reflect}".($nordr==""?" -> {$target}{$localport}":"");