On d9b05eb490 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.
This commit is contained in:
Renato Botelho 2018-02-02 14:47:10 -02:00
parent a464eaf72b
commit daf7490f4d

View File

@ -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;