OPNSense/core 7fc2494src/opnsense/mvc/app/views/OPNsense/Firewall dnat_rule.volt

Enabled tooltips were the wrong way around
DeltaFile
+1-1src/opnsense/mvc/app/views/OPNsense/Firewall/dnat_rule.volt
+1-11 files

OPNSense/core bc763c8src/opnsense/mvc/app/views/OPNsense/Firewall dnat_rule.volt

Enabled tooltips were the wrong way around
DeltaFile
+1-1src/opnsense/mvc/app/views/OPNsense/Firewall/dnat_rule.volt
+1-11 files

OPNSense/core 8512d66src/opnsense/mvc/app/views/OPNsense/Firewall dnat_rule.volt

Fade row when it is disabled, not when it is enabled
DeltaFile
+1-1src/opnsense/mvc/app/views/OPNsense/Firewall/dnat_rule.volt
+1-11 files

OPNSense/core c11efa6src/opnsense/mvc/app/views/OPNsense/Diagnostics fw_log.volt

firewall: live log: revert static property, persistence is disabled for this grid

ref: https://forum.opnsense.org/index.php?topic=49874.0
DeltaFile
+0-1src/opnsense/mvc/app/views/OPNsense/Diagnostics/fw_log.volt
+0-11 files

OPNSense/core d698b4esrc/opnsense/mvc/app/views/OPNsense/Diagnostics fw_log.volt

firewall: live view: restructure DOM layout to reduce wasted space. Closes https://github.com/opnsense/core/issues/9416
DeltaFile
+6-11src/opnsense/mvc/app/views/OPNsense/Diagnostics/fw_log.volt
+6-111 files

OPNSense/core e85bc44. plist

plist
DeltaFile
+1-0plist
+1-01 files

OPNSense/core 71d0c01src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api DNatController.php, src/opnsense/mvc/app/controllers/OPNsense/Firewall/forms dialogDNatRule.xml

Firewall: NAT: Port Forward - refactor to MVC (work in progress) for https://github.com/opnsense/core/issues/8401

Add some missing pieces in the controller layer, use shared getCategoryColors() and getNetworks() to render gui information in the same way as the filter page does.
Use a volatile field categories to keep track of uuid's so we can reuse these easily for matching in our selectors and data.
DeltaFile
+119-23src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api/DNatController.php
+53-0src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/CategoryMapField.php
+11-26src/opnsense/mvc/app/views/OPNsense/Firewall/dnat_rule.volt
+6-0src/opnsense/mvc/app/controllers/OPNsense/Firewall/forms/dialogDNatRule.xml
+2-0src/opnsense/mvc/app/models/OPNsense/Firewall/DNat.xml
+1-0src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/CategoryField.php
+192-496 files

OPNSense/core 46de488src/opnsense/mvc/app/controllers/OPNsense/Firewall DNatController.php, src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api DNatController.php

Firewall: NAT: Port Forward - refactor to MVC (work in progress) for https://github.com/opnsense/core/issues/8401
DeltaFile
+583-0src/opnsense/mvc/app/views/OPNsense/Firewall/dnat_rule.volt
+260-0src/opnsense/mvc/app/controllers/OPNsense/Firewall/forms/dialogDNatRule.xml
+94-0src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api/DNatController.php
+38-0src/opnsense/mvc/app/controllers/OPNsense/Firewall/DNatController.php
+4-1src/opnsense/mvc/app/models/OPNsense/Firewall/Menu/Menu.xml
+979-15 files

OPNSense/core 4eacf64. plist

make plist-fix
DeltaFile
+4-0plist
+4-01 files

OPNSense/core eda8976src/opnsense/mvc/app/models/OPNsense/Firewall DNat.xml DNat.php, src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes DNatSequenceField.php NetworkMappedField.php

Firewall: NAT: Port Forward - refactor to MVC (work in progress) for https://github.com/opnsense/core/issues/8401

Add a model wrapper around nat/rule and align filter code to generate the same output when using the model.
To test this part, make a copy of /tmp/rules.debug, run migrations (/usr/local/opnsense/mvc/script/run_migrations.php) and execute rule generation via /usr/local/etc/rc.filter_configure

A diff between the newly generated rules.debug and the backup created earlier should show no differences.

The following notes apply:

o ipprotocol and protocol have no defaults set as old frontend code didn't enforce this, we should likely set defaults (inet, any) knowing this will show a small diff in the output
o registerForwardRule() replaces the array_merge with an !empty() compare per field as our defaults are empty instead of missing
o legacyMoveAddressFields() in Rule.php assumes any when network and address are not set, which should comply with frontend logic as "any" is set in these cases anyway
o source/destinations are converted inline, using a volatile field to trigger the initial load (as only one is used, we prefer network)
DeltaFile
+112-0src/opnsense/mvc/app/models/OPNsense/Firewall/DNat.xml
+69-0src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/DNatSequenceField.php
+59-0src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/NetworkMappedField.php
+50-0src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/CategoryField.php
+50-0src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/PortMappedField.php
+41-0src/opnsense/mvc/app/models/OPNsense/Firewall/DNat.php
+381-04 files not shown
+398-1910 files

OPNSense/core 7d2d968src/opnsense/mvc/app/library/OPNsense/Base UIModelGrid.php

mvc:model - default sort order ignore in fetchBindRequest() when sort is an ampty array (which is tabulators default now). spotted while working on https://github.com/opnsense/core/issues/8401
DeltaFile
+1-1src/opnsense/mvc/app/library/OPNsense/Base/UIModelGrid.php
+1-11 files

OPNSense/core b171302src/opnsense/scripts/captiveportal cp-background-process.py allow.py, src/opnsense/scripts/captiveportal/lib ipfw.py db.py

captive portal: re-introduce ipfw for accounting purposes only
DeltaFile
+110-0src/opnsense/scripts/captiveportal/lib/ipfw.py
+23-56src/opnsense/scripts/captiveportal/cp-background-process.py
+56-15src/opnsense/scripts/captiveportal/lib/db.py
+0-47src/opnsense/scripts/captiveportal/lib/pf.py
+4-0src/opnsense/service/templates/OPNsense/IPFW/ipfw.conf
+1-0src/opnsense/scripts/captiveportal/allow.py
+194-1181 files not shown
+195-1187 files

OPNSense/core b5cfa1asrc/opnsense/mvc/app/controllers/OPNsense/IPsec/Api ConnectionsController.php, src/opnsense/mvc/app/models/OPNsense/IPsec Swanctl.xml

VPN: IPsec: Connections - partially revert https://github.com/opnsense/core/commit/cf5b944d63a6853fa5d0d2736db154fd6f2ca5f4 and align save() action to setBase's as introduced in https://github.com/opnsense/core/commit/cf5b944d63a6853fa5d0d2736db154fd6f2ca5f4. should fix https://github.com/opnsense/core/issues/9459
DeltaFile
+0-5src/opnsense/mvc/app/models/OPNsense/IPsec/Swanctl.xml
+1-1src/opnsense/mvc/app/controllers/OPNsense/IPsec/Api/ConnectionsController.php
+1-62 files

OPNSense/core 18b2811src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api FilterBaseController.php FilterController.php

Firewall: Rules [new] - move shared logic to FilterBaseController and simpify it a bit. required for https://github.com/opnsense/core/issues/8401
DeltaFile
+80-0src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api/FilterBaseController.php
+0-80src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api/FilterController.php
+80-802 files

OPNSense/core cf5b944src/opnsense/mvc/app/models/OPNsense/IPsec Swanctl.xml Swanctl.php

VPN: IPsec: Connections - prevent model caching when refering items within the same model, closes https://github.com/opnsense/core/issues/9459

Since we keep the model open during the transaction, the child nodes miss their parent when using the cached model. This commit is a variation on https://github.com/opnsense/core/commit/cbd6ea95a759e61bb9a8475b877ebdabf59141e6 and should close the loop.

One other minor problem seems to be that legacy VTI interfaces are able to inject dynamic code which does not fit regular validations. As these items are "view" only, we can ignore them during validation.
DeltaFile
+5-0src/opnsense/mvc/app/models/OPNsense/IPsec/Swanctl.xml
+3-0src/opnsense/mvc/app/models/OPNsense/IPsec/Swanctl.php
+8-02 files

OPNSense/core b15a9c1src/opnsense/mvc/app/models/OPNsense/Kea KeaDhcpv6.php KeaDhcpv4.php

dhcp/kea: Use asInt() where possible (#9460)

DeltaFile
+5-5src/opnsense/mvc/app/models/OPNsense/Kea/KeaDhcpv6.php
+3-3src/opnsense/mvc/app/models/OPNsense/Kea/KeaDhcpv4.php
+8-82 files

OPNSense/core 05f5a4e. plist

make plist-fix
DeltaFile
+4-0plist
+4-01 files

OPNSense/core 067108a. plist, src/opnsense/mvc/tests/app/models/OPNsense/Kea KeaDhcpv4Test.php KeaDhcpv6Test.php

Fixed plist and two tests
DeltaFile
+3-12src/opnsense/mvc/tests/app/models/OPNsense/Kea/KeaDhcpv4Test.php
+3-12src/opnsense/mvc/tests/app/models/OPNsense/Kea/KeaDhcpv6Test.php
+8-0plist
+14-243 files

OPNSense/core 351092csrc/opnsense/mvc/app/models/OPNsense/Kea KeaDhcpv6.php KeaDhcpv4.php

dhcp/kea: Use asInt() where possible
DeltaFile
+5-5src/opnsense/mvc/app/models/OPNsense/Kea/KeaDhcpv6.php
+3-3src/opnsense/mvc/app/models/OPNsense/Kea/KeaDhcpv4.php
+8-82 files

OPNSense/core 45e9025src/opnsense/mvc/app/controllers/OPNsense/Firewall DNatController.php, src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api DNatController.php

Firewall: NAT: Port Forward - refactor to MVC (work in progress) for https://github.com/opnsense/core/issues/8401
DeltaFile
+583-0src/opnsense/mvc/app/views/OPNsense/Firewall/dnat_rule.volt
+260-0src/opnsense/mvc/app/controllers/OPNsense/Firewall/forms/dialogDNatRule.xml
+94-0src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api/DNatController.php
+38-0src/opnsense/mvc/app/controllers/OPNsense/Firewall/DNatController.php
+4-1src/opnsense/mvc/app/models/OPNsense/Firewall/Menu/Menu.xml
+979-15 files

OPNSense/core eb3410bsrc/opnsense/mvc/app/models/OPNsense/Auth/FieldTypes GidField.php UidField.php

mvc: use asInt() in the G/UID fields and adjust wording there
DeltaFile
+3-3src/opnsense/mvc/app/models/OPNsense/Auth/FieldTypes/GidField.php
+3-3src/opnsense/mvc/app/models/OPNsense/Auth/FieldTypes/UidField.php
+6-62 files

OPNSense/core aedce67src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes BaseField.php

mvc: it's time to add asInt()

Switch to casing as intval() and floatval() seem to have annoying
side effects.  Not sure if we use a real asFloat() or just treat
it like ints.  The thing is for JSON output we have to cast to int
so this is much more convenient.
DeltaFile
+11-2src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/BaseField.php
+11-21 files

OPNSense/core e0b5f8dsrc/opnsense/mvc/app/models/OPNsense/Kea KeaDhcpv6.php KeaDhcpv4.php, src/opnsense/www/js jquery.bootgrid.js opnsense_bootgrid_plugin.js

Merge remote-tracking branch 'origin/master' into FR8401_DNAT
DeltaFile
+0-2,241src/opnsense/www/js/jquery.bootgrid.js
+0-625src/opnsense/www/js/opnsense_bootgrid_plugin.js
+25-26src/opnsense/mvc/app/models/OPNsense/Kea/KeaDhcpv6.php
+25-25src/opnsense/mvc/app/models/OPNsense/Kea/KeaDhcpv4.php
+0-21src/opnsense/www/js/jquery.bootgrid.LICENSE
+3-3src/opnsense/mvc/app/models/OPNsense/Kea/KeaCtrlAgent.php
+53-2,9411 files not shown
+54-2,9447 files

OPNSense/core 821ca86src/opnsense/mvc/app/models/OPNsense/Kea KeaDhcpv6.php KeaDhcpv4.php

dhcp/kea: Refactor model to use BaseField helper methods (#9450)

* dhcp/kea: Refactor KeaDhcpv4.php to use BaseField helper methods

* dhcp/kea: Refactor KeaDhcpv6.php to use BaseField helper methods

* dhcp/kea: Refactor KeaCtrlAgent.php to use BaseField helper methods
DeltaFile
+25-26src/opnsense/mvc/app/models/OPNsense/Kea/KeaDhcpv6.php
+25-25src/opnsense/mvc/app/models/OPNsense/Kea/KeaDhcpv4.php
+3-3src/opnsense/mvc/app/models/OPNsense/Kea/KeaCtrlAgent.php
+53-543 files

OPNSense/core 7dabb44src/opnsense/mvc/tests/app/models/OPNsense/Kea KeaCtrlAgentTest.php KeaDhcpv4Test.php, src/opnsense/mvc/tests/app/models/OPNsense/Kea/Base JsonSampleTestCase.php

Add copyright headers
DeltaFile
+26-0src/opnsense/mvc/tests/app/models/OPNsense/Kea/Base/JsonSampleTestCase.php
+26-0src/opnsense/mvc/tests/app/models/OPNsense/Kea/KeaCtrlAgentTest.php
+26-0src/opnsense/mvc/tests/app/models/OPNsense/Kea/KeaDhcpv4Test.php
+26-0src/opnsense/mvc/tests/app/models/OPNsense/Kea/KeaDhcpv6Test.php
+104-04 files

OPNSense/core 63830c7. plist, src/opnsense/www/js jquery.bootgrid.js opnsense_bootgrid_plugin.js

bootgrid: cleanup old files
DeltaFile
+0-2,241src/opnsense/www/js/jquery.bootgrid.js
+0-625src/opnsense/www/js/opnsense_bootgrid_plugin.js
+0-21src/opnsense/www/js/jquery.bootgrid.LICENSE
+0-3plist
+0-2,8904 files

OPNSense/core 055d377src/opnsense/mvc/tests/app/models/OPNsense/Kea KeaDhcpv4Test.php KeaDhcpv6Test.php

Add a few more small scoped tests for enabled, firewall rules, and interface parsing
DeltaFile
+60-0src/opnsense/mvc/tests/app/models/OPNsense/Kea/KeaDhcpv4Test.php
+59-0src/opnsense/mvc/tests/app/models/OPNsense/Kea/KeaDhcpv6Test.php
+119-02 files

OPNSense/core cd67566. plist

pkg: fix plist
DeltaFile
+1-0plist
+1-01 files

OPNSense/core 9f90b66src/opnsense/mvc/app/models/OPNsense/Firewall DNat.xml DNat.php, src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes DNatSequenceField.php NetworkMappedField.php

Firewall: NAT: Port Forward - refactor to MVC (work in progress) for https://github.com/opnsense/core/issues/8401

Add a model wrapper around nat/rule and align filter code to generate the same output when using the model.
To test this part, make a copy of /tmp/rules.debug, run migrations (/usr/local/opnsense/mvc/script/run_migrations.php) and execute rule generation via /usr/local/etc/rc.filter_configure

A diff between the newly generated rules.debug and the backup created earlier should show no differences.

The following notes apply:

o ipprotocol and protocol have no defaults set as old frontend code didn't enforce this, we should likely set defaults (inet, any) knowing this will show a small diff in the output
o registerForwardRule() replaces the array_merge with an !empty() compare per field as our defaults are empty instead of missing
o legacyMoveAddressFields() in Rule.php assumes any when network and address are not set, which should comply with frontend logic as "any" is set in these cases anyway
o source/destinations are converted inline, using a volatile field to trigger the initial load (as only one is used, we prefer network)
DeltaFile
+112-0src/opnsense/mvc/app/models/OPNsense/Firewall/DNat.xml
+69-0src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/DNatSequenceField.php
+59-0src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/NetworkMappedField.php
+50-0src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/CategoryField.php
+50-0src/opnsense/mvc/app/models/OPNsense/Firewall/FieldTypes/PortMappedField.php
+41-0src/opnsense/mvc/app/models/OPNsense/Firewall/DNat.php
+381-04 files not shown
+398-1910 files

OPNSense/core 75e6764src/opnsense/mvc/app/library/OPNsense/Firewall Plugin.php, src/opnsense/mvc/app/models/OPNsense/Routing Gateways.php

System: Gateways: Group - a bit of an experiment for https://github.com/opnsense/core/issues/9442

Since 2023 we have refactored the gateways to MVC, which made ipprotocol part of the output, this eases validation a bit.
The route-to statement can either contain multiple `(if gwip)` entries or multiple `if` entries, but not combined.
This change keeps track of which entries are being added to the route-to statement and ignores the ones that can't be combined.

Let's put this to a test on master for a while.

In the long run the gateway group page should validate these situations to decrease the chance of gateways being silently ignored, but not before a migration to MVC.
DeltaFile
+17-11src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php
+4-3src/opnsense/mvc/app/models/OPNsense/Routing/Gateways.php
+21-142 files