From daf7490f4dfdf8fa5782abe6c8041acdf18925d4 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 2 Feb 2018 14:47:10 -0200 Subject: [PATCH] Fix #8290 On d9b05eb490a the way aliases containing a mix of IP address and FQDNs works has changed and all items were added to filterdns to make sure the pf table created would be persistent. The flag $use_filterdns was being set only when the array item used to control didn't exist yet. Because of that, the second call to the same function made it to return a different result. Set it independent if a new array item is created or not to make the function to properly return the right thing. --- src/etc/inc/filter.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc index 94c1144128..c5cde7bd5d 100644 --- a/src/etc/inc/filter.inc +++ b/src/etc/inc/filter.inc @@ -665,8 +665,8 @@ function filter_generate_nested_alias_recurse($name, $alias, &$aliasnesting, &$a } } else if (!isset($aliasaddrnesting[$address])) { if (!is_ipaddr($address) && !is_subnet($address) && !((($alias_type == 'port') || ($alias_type == 'url_ports')) && is_port_or_range($address)) && is_hostname($address)) { + $use_filterdns = true; if (!isset($filterdns["{$address}{$name}"])) { - $use_filterdns = true; $filterdns["{$address}{$name}"] = "pf {$address} {$name}\n"; } continue;