mirror of
https://github.com/opnsense/core.git
synced 2026-02-18 18:18:13 -05:00
Firewall: Rules [new] - missing implementation for disablereplyto, closes https://github.com/opnsense/core/issues/9785
This commit is contained in:
parent
d5a50a98c2
commit
4a6094b001
1 changed files with 6 additions and 1 deletions
|
|
@ -55,7 +55,7 @@ class FilterRuleContainerField extends ContainerField
|
|||
'label' => $this->getAttribute('uuid')
|
||||
];
|
||||
$map_manual = ['source_net', 'source_not', 'source_port', 'destination_net', 'destination_not',
|
||||
'destination_port', 'enabled', 'description', 'sequence', 'action', 'replyto'];
|
||||
'destination_port', 'enabled', 'description', 'sequence', 'action', 'replyto', 'disablereplyto'];
|
||||
// 1-on-1 map (with type conversion if needed)
|
||||
foreach ($this->iterateItems() as $key => $node) {
|
||||
if (!in_array($key, $map_manual)) {
|
||||
|
|
@ -103,10 +103,15 @@ class FilterRuleContainerField extends ContainerField
|
|||
$result['descr'] = (string)$this->description;
|
||||
$result['type'] = (string)$this->action;
|
||||
$result['reply-to'] = (string)$this->replyto;
|
||||
if (!$this->disablereplyto->isEmpty()) {
|
||||
/* XXX: registerFilterRule() merges disablereplyto, which requires the item to only exist when set */
|
||||
$result['disablereplyto'] = true;
|
||||
}
|
||||
/* XXX this is an approximation of the complex situation and will be removed eventually */
|
||||
if (count($this->interface->getValues()) != 1 || !$this->interfacenot->isEmpty()) {
|
||||
$result['floating'] = true;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue