From 4057a15383009f57d793466e2997e997165c410b Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 3 May 2016 15:07:14 -0400 Subject: Ensure $nat_if_list is always an array before it is used as one. Fixes #6307 --- src/etc/inc/filter.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc index be293cf..9556e15 100644 --- a/src/etc/inc/filter.inc +++ b/src/etc/inc/filter.inc @@ -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"; -- cgit v1.1