Firewall: prevent gateway protocol mismatch from breaking the ruleset.

This commit is contained in:
Ad Schellevis 2020-03-13 17:55:13 +01:00
parent cda4e3561f
commit 893f2a4af9

View File

@ -174,6 +174,13 @@ class FilterRule extends Rule
$rule['disabled'] = true;
$this->log("Gateway down");
}
if (!empty($rule['gateway']) &&
!empty($this->gatewayMapping[$rule['gateway']]) &&
!empty($rule['ipprotocol']) &&
$this->gatewayMapping[$rule['gateway']]['proto'] != $rule['ipprotocol']) {
$rule['disabled'] = true;
$this->log("Gateway protocol mismatch");
}
if (!isset($rule['quick'])) {
// all rules are quick by default except floating
$rule['quick'] = !isset($rule['floating']) ? true : false;