When migrating Category this fails with an error:
Fatal error: Uncaught Error: Call to undefined method OPNsense\Firewall\Category::flushCache() in /usr/local/opnsense/mvc/app/library/OPNsense/Firewall/Util.php:176
Stack trace:
#0 /usr/local/opnsense/mvc/app/models/OPNsense/Firewall/Migrations/M1_0_0.php(103): OPNsense\Firewall\Util::attachAliasObject(Object(OPNsense\Firewall\Category))
#1 /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php(711): OPNsense\Firewall\Migrations\M1_0_0->run(Object(OPNsense\Firewall\Category))
#2 /usr/core/src/opnsense/mvc/script/run_migrations.php(54): OPNsense\Base\BaseModel->runMigrations()
#3 {main}
thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Firewall/Util.php on line 176
We don't even need the full rc.configure_firmware script as that
is for after a core package was updated. Rather we just want the
actual firmware settings to reload so we add a different path for
it. Now it is faster than it ever was.
When children are not of ArrayField type we're only cloning an empty structure which should be relativly safe and can be practical to offer grouping inside the model.
Add iterateRecursiveItems() as easy to use "dig" function to crawl through the model from any given point.
It's a bit of an experiment, but being able to drag the modal is practical sometimes. This commit attaches mouse events to drag on the header of the model so we can move the modal offset, when reopening the same it resets back to its starting position.
The VIPs are bound to the scope so we need to add it to the
address lookup. From the controller emit the same "@" usage
which is used to indicatge a scope, but not no a network
device. If encountered translate the scope back to a network
device and use the proper "%" syntax.
This is a bit of a tricky one, delBase() always locks, which enforces the proper sequence in concurrent operations, but when reading the config first with getModel(), we are locking the wrong state (memory doesn't equal disk anymore).
The new physical_interfaces() helper simplifies the constructions where we just need a list of configured device names, skipping the ones that don't exist.
Refactor existing core templates to remove the use of the interface.macro file.
Ok, so now we work with 1.20 but cannot use it because we can't render
the repo file before pkg updates itself and causes it to malfunction.
That means we cannot add 1.20 before 24.1.1.
Even if we fixed our mirror to be SRV compatible two facts remain:
1. We cannot control third party mirrors which will likely all be
plain HTTP(S).
2. pkg 1.20.x from FreeBSD will still break firewall operation and
upgrades if left on the system so we make the situation better now
to bite the user later on.
flushed states are propagated to pfsync, which means a machine
in backup state is still vulnerable to any event that hooks
into the interface_bring_down logic on the primary machine.
The danger representation is a bit over the top for deleting
a backup. The revert is a bit too lax. So move both to a
warning and indicate that the yes button is the one that should
be clicked in these cases, but in the same warning color as the
modal itself. While here change the title to something more
appropriate.
Two issues found, when optgroup is not used and filled with an empty item, the length of the group seems to be 0. To retrieve the selected values, we should use val() as iterating the children of the select won't return the options anymore.
This happened two times now...
[09-Oct-2023 19:25:44 Europe/Berlin] PHP Fatal error: Uncaught Error: Class "OPNsense\Base\ModelException" not found in /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php:314
Stack trace:
thrown in /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php on line 314