Commit 1a3cd61d authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

move skip_rules_gw_down feature to rule processing

parent b4553f04
......@@ -313,6 +313,11 @@ class FilterRule
if (!empty($interface) && empty($this->interfaceMapping[$interface]['if'])) {
$tmp['disabled'] = true;
}
// disable rules when gateway is down and skip_rules_gw_down is set
if (!empty($tmp['skip_rules_gw_down']) && !empty($tmp['gateway']) &&
empty($this->gatewayMapping[$tmp['gateway']])) {
$tmp['disabled'] = true;
}
if (!isset($tmp['quick'])) {
// all rules are quick by default except floating
$tmp['quick'] = !isset($rule['floating']) ? true : false;
......
......@@ -51,6 +51,9 @@ class Plugin
if (!empty(Config::getInstance()->object()->system->disablereplyto)) {
$this->systemDefaults['disablereplyto'] = true;
}
if (!empty(Config::getInstance()->object()->system->skip_rules_gw_down)) {
$this->systemDefaults['skip_rules_gw_down'] = true;
}
}
/**
......
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