firewall: 'natreflection' rule attribute missed in migration

PR: https://forum.opnsense.org/index.php?topic=41122.0
This commit is contained in:
Franco Fichtner 2024-06-19 14:11:41 +02:00
parent 0aa2b491af
commit 324f5351dd

View File

@ -34,7 +34,7 @@ use OPNsense\Firewall\Category;
use OPNsense\Firewall\Filter;
use OPNsense\Firewall\Util;
// <!-- external, category, descr, interface, type, src, dst, natreflection, disabled -->
// <!-- external, category, descr, interface, type, source, destination, natreflection, disabled -->
class MFP1_0_4 extends BaseModelMigration
{
@ -83,10 +83,12 @@ class MFP1_0_4 extends BaseModelMigration
$node->external = (string)$child->external;
$node->source_net = $addr['source'];
$node->destination_net = $addr['source'];
$node->source_not = !empty((string)$child->source->not) ? '1' : '0';
$node->destination_not = !empty((string)$child->destination->not) ? '1' : '0';
$node->source_not = !empty((string)$child->source->not) ? '1' : '0';
$node->destination_not = !empty((string)$child->destination->not) ? '1' : '0';
$node->description = (string)$child->descr;
if (!empty((string)$child->natreflection)) {
$node->natreflection = (string)$child->natreflection;
}
}
}
}