Commit 616a44dc authored by Franco Fichtner's avatar Franco Fichtner

filter: direction 'any' wasn't respected in floating rule

(cherry picked from commit 895e30d1)
parent 3deb9359
......@@ -2297,11 +2297,15 @@ function filter_generate_user_rule(&$FilterIflist, $rule)
} else {
$aline['type'] = $type . " ";
}
if (isset($rule['floating']) && $rule['floating'] == "yes" && $rule['direction'] != "any") {
$aline['direction'] = " " . $rule['direction'] . " ";
if (isset($rule['floating']) && $rule['floating'] == 'yes') {
if ($rule['direction'] != 'any') {
$aline['direction'] = " {$rule['direction']} ";
} elseif ($$rule['direction'] == 'any') {
$aline['direction'] = '';
}
} else {
/* ensure the direction is in */
$aline['direction'] = " in ";
/* ensure the direction is 'in' */
$aline['direction'] = ' in ';
}
if (isset($rule['log'])) {
$aline['log'] = "log ";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment