mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
os-firewall: parse error on invert options. "not" is treated being set or unset in core.
https://github.com/opnsense/plugins/issues/1720
This commit is contained in:
+6
-2
@@ -67,7 +67,9 @@ class FilterRuleContainerField extends ContainerField
|
||||
$result['source'] = array();
|
||||
if (!empty((string)$this->source_net)) {
|
||||
$result['source']['network'] = (string)$this->source_net;
|
||||
$result['source']['not'] = !empty((string)$this->source_not);
|
||||
if (!empty((string)$this->source_not)) {
|
||||
$result['source']['not'] = true;
|
||||
}
|
||||
if (!empty((string)$this->source_port)) {
|
||||
$result['source']['port'] = (string)$this->source_port;
|
||||
}
|
||||
@@ -75,7 +77,9 @@ class FilterRuleContainerField extends ContainerField
|
||||
$result['destination'] = array();
|
||||
if (!empty((string)$this->destination_net)) {
|
||||
$result['destination']['network'] = (string)$this->destination_net;
|
||||
$result['destination']['not'] = !empty((string)$this->destination_not);
|
||||
if (!empty((string)$this->destination_not)) {
|
||||
$result['destination']['not'] = true;
|
||||
}
|
||||
if (!empty((string)$this->source_port)) {
|
||||
$result['destination']['port'] = (string)$this->destination_port;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user