OPNSense/core 81ecc79src/opnsense/scripts/kea kea_prefix_watcher.py

kea: Add scope ID to prefix watcher link local address to fix route add (#9778)

(cherry picked from commit c145e5c30e0121153fcbaf125b29dbfbb68af101)
DeltaFile
+2-1src/opnsense/scripts/kea/kea_prefix_watcher.py
+2-11 files

OPNSense/core 82a3115src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes FilterRuleField.php

Firewall: Rules [new] - missing implementation for disablereplyto, closes https://github.com/opnsense/core/issues/9785

(cherry picked from commit 4a6094b0019bbf99e74525338edb3829140bb86e)
DeltaFile
+6-1src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/FilterRuleField.php
+6-11 files

OPNSense/core 59cf594src/www firewall_nat_out_edit.php interfaces_ppps_edit.php

www: change all the others for previous
DeltaFile
+12-14src/www/firewall_nat_out_edit.php
+5-11src/www/interfaces_ppps_edit.php
+5-10src/www/firewall_rules.php
+4-6src/www/interfaces.php
+2-2src/www/system_authservers.php
+2-2src/www/firewall_nat_out.php
+30-452 files not shown
+32-478 files

OPNSense/core 4a6094bsrc/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes FilterRuleField.php

Firewall: Rules [new] - missing implementation for disablereplyto, closes https://github.com/opnsense/core/issues/9785
DeltaFile
+6-1src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/FilterRuleField.php
+6-11 files

OPNSense/core a971a60src/etc/inc config.inc, src/www interfaces_assign.php firewall_schedule_edit.php

backend: allow non-intrusive config_read_array() for #9786

When config keys are not found or are not arrays that should
be especially for iterating with foreach we do a trick here
by returning a detached empty array to avoid upper layer
errors, forcing empty arrays into $config yet reading and
removal still work fine.  The default stays the "insert" mode,
which can be triggered explicitly just for symmetry.  Bools
are not in the keys so this is perfectly fine.

The function was added in 4c179c23 in 2017 and hasn't been
modified since which is quite the achievement IMO.  It's
had a clear purpose but now we make it just a little bit
better.  :)

Look for more references at least in the legacy pages:

    # git grep 'foreach.($config\[' src/www
DeltaFile
+13-25src/www/interfaces_assign.php
+11-25src/www/firewall_schedule_edit.php
+28-3src/etc/inc/config.inc
+1-1src/www/system_gateway_groups.php
+53-544 files

OPNSense/core d5a50a9src/opnsense/mvc/app/views/OPNsense/Firewall filter_rule.volt

Firewall: Rules [new]: Move download and upload commands out of partial into global commands (#9781)

DeltaFile
+27-23src/opnsense/mvc/app/views/OPNsense/Firewall/filter_rule.volt
+27-231 files

OPNSense/core 8405980src/opnsense/mvc/app/views/OPNsense/Interface overview.volt, src/opnsense/www/js opnsense_bootgrid.js

interfaces: overview: clean up UI code and fix CARP badge alignment
DeltaFile
+130-133src/opnsense/mvc/app/views/OPNsense/Interface/overview.volt
+2-2src/opnsense/www/js/opnsense_bootgrid.js
+132-1352 files

OPNSense/core 20f08aasrc/opnsense/mvc/app/views/OPNsense/Firewall filter_rule.volt

Firewall: Rules [new]: Move commands out of partial
DeltaFile
+27-23src/opnsense/mvc/app/views/OPNsense/Firewall/filter_rule.volt
+27-231 files

OPNSense/core fbe3b14src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api FilterController.php

Revert changes to FilterController since that is solved on a different layer now
DeltaFile
+2-6src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api/FilterController.php
+2-61 files

OPNSense/core 241fb0csrc/opnsense/mvc/app/library/OPNsense/Core Type.php

Correct a typo in comment
DeltaFile
+1-1src/opnsense/mvc/app/library/OPNsense/Core/Type.php
+1-11 files

OPNSense/core 1ef4295src/opnsense/mvc/app/library/OPNsense/Base UIModelGrid.php

There is no this here, fix typo
DeltaFile
+1-1src/opnsense/mvc/app/library/OPNsense/Base/UIModelGrid.php
+1-11 files

OPNSense/core 61525e7src/opnsense/mvc/app/controllers/OPNsense/Base ApiMutableModelControllerBase.php, src/opnsense/mvc/app/library/OPNsense/Base UIModelGrid.php

Move searchPhrase tokenization to ApiMutableControllerBase searchBase()
Determine if search_tokens contain a valid UUID, if yes collect the uuid field so it can be searched. Doing this prevents finding partial strings in UUIDs, but allows to find exact UUIDs.
Inside UIModelGrid fetchBindRequest(), use the search_tokens directly. A compatability case makes this backwards compatible for callers that do not know about search_tokens.
Pass the search_tokens directky into UIModelGrid fetch() instead of the raw searchPhrase.
DeltaFile
+13-14src/opnsense/mvc/app/library/OPNsense/Base/UIModelGrid.php
+9-1src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableModelControllerBase.php
+22-152 files

OPNSense/core 7bcfd7dsrc/opnsense/www/js opnsense_bootgrid.js

bootgrid: swap order of custom commands placement making sure they participate in command binding
DeltaFile
+5-5src/opnsense/www/js/opnsense_bootgrid.js
+5-51 files

OPNSense/core 5b3b163src/opnsense/www/js opnsense_bootgrid.js

bootgrid: swap order of custom commands placement making sure they participate in command binding
DeltaFile
+5-5src/opnsense/www/js/opnsense_bootgrid.js
+5-51 files

OPNSense/core 3f5c666src/opnsense/mvc/app/controllers/OPNsense/Base ApiMutableModelControllerBase.php, src/opnsense/mvc/app/controllers/OPNsense/Routing/Api SettingsController.php

Rename isValidUUID() to isUUID(), feedback @fichtner
DeltaFile
+2-2src/opnsense/mvc/app/controllers/OPNsense/Routing/Api/SettingsController.php
+2-2src/opnsense/mvc/app/library/OPNsense/Core/Type.php
+1-1src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableModelControllerBase.php
+1-1src/opnsense/mvc/app/library/OPNsense/Base/UIModelGrid.php
+6-64 files

OPNSense/core 22b36dcsrc/opnsense/scripts/firmware upgrade.sh

firmware: restructure upgrade code

Goes over the previous change by calling the reboot only once
instead of three times:

Here we are told there are upgrades pending and the upgrade hooks
were returning successfully.  Apply the kernel immediately if
necessary to save a reboot.  Contrary to popular belief the kernel
can still apply during a reboot if something went wrong, but this
way we save a reboot.  After that don't question that a reboot is
necessary to avoid ever falling into the error case for no reason.
DeltaFile
+2-6src/opnsense/scripts/firmware/upgrade.sh
+2-61 files

OPNSense/core f0452d6src/opnsense/mvc/app/library/OPNsense/Core Type.php

Add a new static function containsUUID() to the new Type class. Remove some phpdoc as the function is self documenting in its types.
DeltaFile
+15-4src/opnsense/mvc/app/library/OPNsense/Core/Type.php
+15-41 files

OPNSense/core 81231f5src/etc/inc interfaces.inc, src/opnsense/scripts/interfaces rtsold_script.sh

interfaces: multi-dhcp6c support and custom PD association #7647

This splits off rtsold and dhcp6c into separate processes
which frees us from the restrictions of faked iterative IDs
for PD associations.  For NA we simply default to 0 now.

I'm not entirely sure why we settled for a single deamon of
dhcp6c back in the day, but there are certianly downsides to
it and I don't see something that wasn't fixed in the meantime
that makes this not work.
DeltaFile
+22-58src/etc/inc/interfaces.inc
+58-4src/www/interfaces.php
+6-6src/opnsense/scripts/interfaces/rtsold_script.sh
+86-683 files

OPNSense/core 0e31c27src/opnsense/scripts/firmware/repos OPNsense.php

firmware: use portable -E supported by opnsense-update now for #9275
DeltaFile
+4-8src/opnsense/scripts/firmware/repos/OPNsense.php
+4-81 files

OPNSense/core a5d5d9asrc/opnsense/mvc/app/library/OPNsense/Core Type.php

Style in previous
DeltaFile
+2-1src/opnsense/mvc/app/library/OPNsense/Core/Type.php
+2-11 files

OPNSense/core a701b69. plist, src/opnsense/mvc/app/controllers/OPNsense/Base ApiMutableModelControllerBase.php

Create new Type class in core library and add isValidUUID static, replace individual callers with the new static
DeltaFile
+46-0src/opnsense/mvc/app/library/OPNsense/Core/Type.php
+3-13src/opnsense/mvc/app/library/OPNsense/Base/UIModelGrid.php
+2-13src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableModelControllerBase.php
+3-2src/opnsense/mvc/app/controllers/OPNsense/Routing/Api/SettingsController.php
+1-0plist
+55-285 files

OPNSense/core 8b861a8src/etc/inc interfaces.inc, src/opnsense/scripts/interfaces rtsold_script.sh

interfaces: multi-dhcp6c support and custom PD association #7647

This splits off rtsold and dhcp6c into separate processes
which frees us from the restrictions of faked iterative IDs
for PD associations.  For NA we simply default to 0 now.

I'm not entirely sure why we settled for a single deamon of
dhcp6c back in the day, but there are certianly downsides to
it and I don't see something that wasn't fixed in the meantime
that makes this not work.
DeltaFile
+22-58src/etc/inc/interfaces.inc
+58-4src/www/interfaces.php
+6-6src/opnsense/scripts/interfaces/rtsold_script.sh
+86-683 files

OPNSense/core 6bd41d3src/opnsense/mvc/app/controllers/OPNsense/Base ApiMutableModelControllerBase.php, src/opnsense/mvc/app/controllers/OPNsense/Core/Api SnapshotsController.php

mvc: sweep
DeltaFile
+4-4src/opnsense/mvc/app/controllers/OPNsense/Core/Api/SnapshotsController.php
+1-1src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableModelControllerBase.php
+5-52 files

OPNSense/core ee040besrc/opnsense/mvc/app/models/OPNsense/Base/Menu MenuItem.php MenuSystem.php

menu: tweak this a little more

findNodeById() is not needed as findNodeByPath() does the same.
It's also not used anywhere else so just merge both.

On the system end make a getItem() which makes the code a little
cleaner and reduces callers of findNodeByPath() to one.  ;)
DeltaFile
+13-18src/opnsense/mvc/app/models/OPNsense/Base/Menu/MenuItem.php
+12-2src/opnsense/mvc/app/models/OPNsense/Base/Menu/MenuSystem.php
+25-202 files

OPNSense/core beed8f1src/opnsense/mvc/app/controllers/OPNsense/Core/Api SnapshotsController.php, src/opnsense/mvc/app/controllers/OPNsense/Core/forms snapshot.xml

System: Snapshots - add note field to store comments. closes https://github.com/opnsense/core/issues/9764

One of the main issues with our previous bectl output was the variance of the (uuid) key, which we generated using the current name.
By using the create timestamp (acquired via zfs), we can keep our key stable on renames and offer access to simple json files on disk which contain additional notes.

Notes are stored in /conf/snapshots/ as json files, keyed by their generated uuid's.
DeltaFile
+62-4src/opnsense/mvc/app/controllers/OPNsense/Core/Api/SnapshotsController.php
+8-2src/opnsense/scripts/system/bectl.py
+5-0src/opnsense/mvc/app/controllers/OPNsense/Core/forms/snapshot.xml
+75-63 files

OPNSense/core 66261e1src/opnsense/www/js opnsense_bootgrid.js

bootgrid: fix curRowCount type conversion issue when stored in localstorage.
DeltaFile
+3-1src/opnsense/www/js/opnsense_bootgrid.js
+3-11 files

OPNSense/core 1669418src/opnsense/mvc/app/library/OPNsense/Base UIModelGrid.php

mvc: idea to add UUID to the fields that can be searched, but only if the searchPhrase contains a valid UUID. That way it won't match on partial strings.
DeltaFile
+19-0src/opnsense/mvc/app/library/OPNsense/Base/UIModelGrid.php
+19-01 files

OPNSense/core c0569f8src/opnsense/mvc/app/controllers/OPNsense/Base ApiMutableModelControllerBase.php, src/opnsense/www/js opnsense_bootgrid.js

bootgrid: batch delete-selected by default (#9779)

* bootgrid: batch delete-selected by default

* ApiMutableModelControllerBase - simplify checkAndThrowSafeDelete in delBase a bit for https://github.com/opnsense/core/pull/9779

* use a descriptive name if available

---------

Co-authored-by: Ad Schellevis <ad at opnsense.org>
DeltaFile
+34-16src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableModelControllerBase.php
+14-13src/opnsense/www/js/opnsense_bootgrid.js
+48-292 files

OPNSense/core d0d6de2src/opnsense/mvc/app/controllers/OPNsense/Base ApiMutableModelControllerBase.php

ApiMutableModelControllerBase - simplify checkAndThrowSafeDelete in delBase a bit for https://github.com/opnsense/core/pull/9779
DeltaFile
+18-19src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableModelControllerBase.php
+18-191 files

OPNSense/core 63e0b92src/opnsense/mvc/app/views/OPNsense/Diagnostics fw_log.volt, src/opnsense/mvc/app/views/OPNsense/Firewall filter_rule.volt dnat_rule.volt

Firewall: Rules [new]: Add a command button to open the live log with prefilled rule ID (#9770)

fw_log.volt:
Uses a url hash inside fw_log.volt to set a filter when opening it through a link from filter_rule.volt
The url hash can set any type of a single filter, so it can be reused in other pages as well.
Combine entry point of addCombinedFilter and addFilter, decide via array in field what type it is.
Change init entrypoint to always go through the filterChange() pipeline, but have a fast path in there that initializes without a filter. This adds the filter immediately when loading with the page with the URL hash
Make sure we want for tableBuilt to prevent replaceData errors

filter_rule.volt
Only show the log search button when row.log is 1 or true
Change fa icon in the lookup rule reference button in dnat as well for consistency
Use URLSearchParams()

---------

Co-authored-by: Stephan de Wit <stephan.de.wit at deciso.com>
DeltaFile
+30-24src/opnsense/mvc/app/views/OPNsense/Diagnostics/fw_log.volt
+36-17src/opnsense/mvc/app/views/OPNsense/Firewall/filter_rule.volt
+3-3src/opnsense/mvc/app/views/OPNsense/Firewall/dnat_rule.volt
+69-443 files