mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Ensure $nat_if_list is always an array before it is used as one. Fixes #6307
This commit is contained in:
parent
f06b86ca11
commit
f91d05dd64
@ -1907,6 +1907,7 @@ function filter_nat_rules_generate() {
|
||||
}
|
||||
|
||||
$natif = $FilterIflist[$natif]['if'];
|
||||
$nat_if_list = array();
|
||||
|
||||
if (isset($rule['nobinat'])) {
|
||||
$natrules .= "no binat on {$natif} from {$srcaddr} to {$dstaddr}\n";
|
||||
@ -1918,8 +1919,6 @@ function filter_nat_rules_generate() {
|
||||
if ((isset($config['system']['enablebinatreflection']) || $rule['natreflection'] == "enable") &&
|
||||
($rule['natreflection'] != "disable")) {
|
||||
$nat_if_list = filter_get_reflection_interfaces($natif);
|
||||
} else {
|
||||
$nat_if_list = array();
|
||||
}
|
||||
|
||||
$natrules .= "binat on {$natif} from {$srcaddr} to {$dstaddr} -> {$target}{$sn1}\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user