From 4d536c458db73fc275ba91e53c186d461ad32b72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20PAPPALARDO?= Date: Sun, 15 Nov 2026 19:46:18 +0100 Subject: [PATCH 01/17] fix(DHCPServer): accept OUI-partial MAC entries in mac_allow/mac_deny (GUI parity) --- .../local/pkg/RESTAPI/Models/DHCPServer.inc | 8 ++-- .../RESTAPI/Models/DHCPServerAddressPool.inc | 8 ++-- .../Tests/APIModelsDHCPServerTestCase.inc | 14 ++++++ ...IValidatorsMACAddressValidatorTestCase.inc | 44 +++++++++++++++++++ .../Validators/MACAddressValidator.inc | 9 +++- 5 files changed, 73 insertions(+), 10 deletions(-) diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/DHCPServer.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/DHCPServer.inc index da29058ff..b0c6fe1b5 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/DHCPServer.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/DHCPServer.inc @@ -128,8 +128,8 @@ class DHCPServer extends Model { many: true, maximum_length: 17, verbose_name: 'MAC Allow', - validators: [new MACAddressValidator()], - help_text: 'MAC addresses this DHCP server is allowed to provide leases for.', + validators: [new MACAddressValidator(allow_partial: true)], + help_text: 'MAC addresses this DHCP server is allowed to provide leases for. OUI prefixes (partial MACs, e.g. `EC:71:DB`) are accepted to match all devices of a vendor (GUI parity).', ); $this->mac_deny = new StringField( default: [], @@ -137,8 +137,8 @@ class DHCPServer extends Model { many: true, maximum_length: 17, verbose_name: 'MAC Deny', - validators: [new MACAddressValidator()], - help_text: 'MAC addresses this DHCP server is not allowed to provide leases for.', + validators: [new MACAddressValidator(allow_partial: true)], + help_text: 'MAC addresses this DHCP server is not allowed to provide leases for. OUI prefixes (partial MACs, e.g. `EC:71:DB`) are accepted to match all devices of a vendor (GUI parity).', ); $this->domainsearchlist = new StringField( default: [], diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/DHCPServerAddressPool.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/DHCPServerAddressPool.inc index 0a4674d2a..65265ff1f 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/DHCPServerAddressPool.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/DHCPServerAddressPool.inc @@ -74,18 +74,18 @@ class DHCPServerAddressPool extends Model { allow_empty: true, many: true, maximum_length: 17, - validators: [new MACAddressValidator()], + validators: [new MACAddressValidator(allow_partial: true)], verbose_name: 'MAC Allow', - help_text: 'MAC addresses this DHCP server is allowed to provide leases for.', + help_text: 'MAC addresses this DHCP server is allowed to provide leases for. OUI prefixes (partial MACs, e.g. `EC:71:DB`) are accepted to match all devices of a vendor (GUI parity).', ); $this->mac_deny = new StringField( default: [], allow_empty: true, many: true, maximum_length: 17, - validators: [new MACAddressValidator()], + validators: [new MACAddressValidator(allow_partial: true)], verbose_name: 'MAC Deny', - help_text: 'MAC addresses this DHCP server is not allowed to provide leases for.', + help_text: 'MAC addresses this DHCP server is not allowed to provide leases for. OUI prefixes (partial MACs, e.g. `EC:71:DB`) are accepted to match all devices of a vendor (GUI parity).', ); $this->domainsearchlist = new StringField( default: [], diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsDHCPServerTestCase.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsDHCPServerTestCase.inc index 48eb6c056..b08d234af 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsDHCPServerTestCase.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsDHCPServerTestCase.inc @@ -677,4 +677,18 @@ class APIModelsDHCPServerTestCase extends TestCase { # Delete the test interface $interface->delete(); } + + /** + * Ensures OUI-partial MAC entries (vendor prefixes, a supported pfSense GUI feature) are accepted in + * mac_allow/mac_deny. Regression test: these fields are revalidated on every PATCH, so strict validation + * locked entire scopes containing legacy partial entries behind HTTP 400 MAC_ADDRESS_VALIDATOR_FAILED. + */ + public function test_accept_oui_partial_mac_entries(): void { + $this->assert_does_not_throw(function (): void { + $dhcp_server = new DHCPServer(id: 'lan', async: false); + $dhcp_server->mac_deny->value = ['EC:71:DB', '00:60:6E', 'B8:27:EB']; + $dhcp_server->mac_allow->value = ['DC:A6:32']; + $dhcp_server->update(); + }); + } } diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIValidatorsMACAddressValidatorTestCase.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIValidatorsMACAddressValidatorTestCase.inc index ae40b9725..a7afe3741 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIValidatorsMACAddressValidatorTestCase.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIValidatorsMACAddressValidatorTestCase.inc @@ -31,4 +31,48 @@ class APIValidatorsMACAddressValidatorTestCase extends TestCase { $test_validator->validate('00:13:10:00:00:0A'); }); } + + /** + * Checks that partial MAC addresses (OUI prefixes) are still rejected when the default strict mode is used. + */ + public function test_throw_response_for_partial_mac_by_default() { + $this->assert_throws_response( + response_id: 'MAC_ADDRESS_VALIDATOR_FAILED', + code: 400, + callable: function () { + $test_validator = new MACAddressValidator(); + $test_validator->validate('EC:71:DB'); + }, + ); + } + + /** + * Checks that partial MAC addresses (OUI prefixes) are accepted when allow_partial is enabled, matching the + * pfSense GUI behavior for DHCP mac_allow/mac_deny vendor prefix matching. + */ + public function test_allow_partial_accepts_oui_prefixes() { + $this->assert_does_not_throw(function () { + $test_validator = new MACAddressValidator(allow_partial: true); + $test_validator->validate('EC:71:DB'); + $test_validator->validate('00:60'); + $test_validator->validate('B8:27:EB:AA'); + $test_validator->validate('00:13:10:00:00:00'); + }); + } + + /** + * Checks that garbage values are still rejected when allow_partial is enabled. + */ + public function test_allow_partial_still_rejects_garbage() { + $this->assert_throws_response( + response_id: 'MAC_ADDRESS_VALIDATOR_FAILED', + code: 400, + callable: function () { + $test_validator = new MACAddressValidator(allow_partial: true); + $test_validator->validate('EC:71:ZZ'); + $test_validator->validate('not a MAC!'); + $test_validator->validate('00:13:10:00:00:00:00'); + }, + ); + } } diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Validators/MACAddressValidator.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Validators/MACAddressValidator.inc index 35a2a3d6c..3b00eb2b2 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Validators/MACAddressValidator.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Validators/MACAddressValidator.inc @@ -12,13 +12,18 @@ use RESTAPI\Responses\ValidationError; */ class MACAddressValidator extends RESTAPI\Core\Validator { public array $allow_keywords; + public bool $allow_partial; /** * Constructs the MACAddressValidator with requested parameters. * @param array $allow_keywords An array of specified non-MAC address keywords that should be considered valid. + * @param bool $allow_partial Whether partial MAC addresses (OUI prefixes such as `EC:71:DB`) are considered + * valid. This mirrors the pfSense GUI, which accepts partial MACs in DHCP `mac_allow`/`mac_deny` fields to + * match all devices of a vendor. Defaults to false to preserve strict full-MAC validation. */ - public function __construct(array $allow_keywords = []) { + public function __construct(array $allow_keywords = [], bool $allow_partial = false) { $this->allow_keywords = $allow_keywords; + $this->allow_partial = $allow_partial; } /** @@ -29,7 +34,7 @@ class MACAddressValidator extends RESTAPI\Core\Validator { */ public function validate(mixed $value, string $field_name = ''): void { # Throw a ValidationError if this value is not a MAC address or an allowed keyword - if (!is_macaddr($value) and !in_array($value, $this->allow_keywords)) { + if (!is_macaddr($value, $this->allow_partial) and !in_array($value, $this->allow_keywords)) { throw new ValidationError( message: "Field `$field_name` must be a valid MAC address, received `$value`.", response_id: 'MAC_ADDRESS_VALIDATOR_FAILED', From 140c2b2dbd83d2d5c3b0d6b92dc1efc99952c051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20PAPPALARDO?= Date: Sun, 15 Nov 2026 23:51:24 +0100 Subject: [PATCH 02/17] fix(NetworkInterface): only validate descr filter-name rules on CHANGED values --- .../pkg/RESTAPI/Models/NetworkInterface.inc | 20 ++++++++-- .../APIModelsNetworkInterfaceTestCase.inc | 40 +++++++++++++++++++ 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/NetworkInterface.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/NetworkInterface.inc index a9bc9b70f..531ab6034 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/NetworkInterface.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/NetworkInterface.inc @@ -94,10 +94,7 @@ class NetworkInterface extends Model { required: true, unique: true, maximum_length: 128, - validators: [ - new FilterNameValidator(), - new UniqueFromForeignModelValidator(model: 'FirewallAlias', field: 'name'), - ], + validators: [new UniqueFromForeignModelValidator(model: 'FirewallAlias', field: 'name')], verbose_name: 'Description', help_text: 'The descriptive name for this interface.', ); @@ -445,6 +442,16 @@ class NetworkInterface extends Model { * @returns string The validated $descr to set. * @throws ValidationError When the `$descr` value is invalid. */ public function validate_descr(string $descr): string { + # Only apply the filter-name validation when the descr CHANGES. pfSense + # revalidates every field on PATCH, so validating an unchanged value + # would lock entire interfaces whose pre-existing descr predates these + # rules (e.g. 'LAN', which matches a reserved pf filter token) — the + # GUI allows such interfaces to be edited without renaming. + $initial = $this->initial_object; + if ($initial !== null and $initial->descr->value === $descr) { + return $descr; + } + # Ensure OpenVPN interfaces are 22 characters or less if (str_starts_with($this->if->value, 'ovpn') and strlen($descr) > 22) { throw new ValidationError( @@ -477,6 +484,11 @@ class NetworkInterface extends Model { ); } + # Filter-name rules apply to NEW/CHANGED descr values only (moved + # from the field-level validator so unchanged legacy values are + # not re-validated on unrelated PATCHes). + (new FilterNameValidator())->validate($descr, 'descr'); + return $descr; } diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc index ea6bf6c79..b4911cacf 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc @@ -876,4 +876,44 @@ class APIModelsNetworkInterfaceTestCase extends TestCase { } # TODO: Needs Tests to ensure other interface types are correctly configured on the backend + + /** + * Checks that a NEW descr value violating filter-name rules is rejected + * (FilterNameValidator now runs in validate_descr for changed values). + */ + public function test_descr_new_value_rejects_reserved_name() { + $this->assert_throws_response( + response_id: 'FILTER_NAME_VALIDATOR_RESERVED_NAME_USED', + code: 400, + callable: function () { + $test_model = new NetworkInterface(); + $test_model->if->value = 'igc0'; + $test_model->validate_descr('LAN'); + }, + ); + } + + /** + * Checks that validate_descr accepts reserved legacy values when the + * descr is UNCHANGED from the initial object (regression: pfSense + * revalidates every field on PATCH; validating an unchanged value + * locked whole interfaces whose descr predates the rules). + */ + public function test_descr_unchanged_legacy_value_not_revalidated() { + $this->assert_does_not_throw( + callable: function () { + $test_model = new NetworkInterface(); + $test_model->if->value = 'igc0'; + + # Simulate a loaded object whose initial descr is a legacy + # reserved token (e.g. created before the validator existed) + $test_model->initial_object = $test_model->copy(); + $test_model->initial_object->descr->value = 'LAN'; + $test_model->descr->value = 'LAN'; + + # Unchanged descr -> no filter-name validation + $test_model->validate_descr('LAN'); + }, + ); + } } From 1533c76a87a235c7d0cf21b98bd873111594a0dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20PAPPALARDO?= <16377344+lemassykoi@users.noreply.github.com> Date: Thu, 19 Nov 2026 02:15:16 +0100 Subject: [PATCH 03/17] feat(NetworkInterface): expose DHCPv6 client PD fields (dhcp6-ia-pd-len, dhcp6prefixonly) --- .../pkg/RESTAPI/Models/NetworkInterface.inc | 39 +++++++++++++++++++ .../APIModelsNetworkInterfaceTestCase.inc | 32 +++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/NetworkInterface.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/NetworkInterface.inc index 531ab6034..ad0f187f1 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/NetworkInterface.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/NetworkInterface.inc @@ -61,6 +61,8 @@ class NetworkInterface extends Model { public ForeignModelField $gatewayv6; public BooleanField $ipv6usev4iface; public BooleanField $slaacusev4iface; + public BooleanField $dhcp6prefixonly; + public StringField $dhcp6_ia_pd_len; public StringField $prefix_6rd; public StringField $gateway_6rd; public IntegerField $prefix_6rd_v4plen; @@ -364,6 +366,43 @@ class NetworkInterface extends Model { verbose_name: 'SLAAC Use IPv4 Interface', help_text: 'Enable or disable IPv6 using the IPv4 connectivity link (PPPoE).', ); + + $this->dhcp6prefixonly = new BooleanField( + default: false, + conditions: ['typev6' => 'dhcp6'], + verbose_name: 'Request Only an IPv6 Prefix', + help_text: 'Only request an IPv6 prefix, do not request an IPv6 address.', + ); + $this->dhcp6_ia_pd_len = new StringField( + required: false, + default: 'none', + allow_empty: false, + conditions: ['typev6' => 'dhcp6'], + choices: [ + 'none', + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + '10', + '11', + '12', + '13', + '14', + '15', + '16', + ], + internal_name: 'dhcp6-ia-pd-len', + maximum_length: 4, + verbose_name: 'DHCPv6 Prefix Delegation size', + help_text: 'The delegated prefix length provided by the DHCPv6 server. `none` disables delegation; numeric values are the IA-PD length (16 -> /48 ... 0 -> /64). Normally specified by the ISP.', + ); $this->prefix_6rd = new StringField( required: true, unique: true, diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc index b4911cacf..a3359adf5 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc @@ -916,4 +916,36 @@ class APIModelsNetworkInterfaceTestCase extends TestCase { }, ); } + + /** + * Checks that dhcp6_ia_pd_len accepts the GUI choices ('none' and the + * 16..0 IA-PD lengths) and rejects out-of-set values. + */ + public function test_dhcp6_ia_pd_len_choices() { + $this->assert_does_not_throw( + callable: function () { + $test_model = new NetworkInterface(); + $test_model->typev6->value = 'dhcp6'; + $test_model->dhcp6_ia_pd_len->value = '0'; + }, + ); + + $this->assert_does_not_throw( + callable: function () { + $test_model = new NetworkInterface(); + $test_model->typev6->value = 'dhcp6'; + $test_model->dhcp6_ia_pd_len->value = 'none'; + }, + ); + + $this->assert_throws_response( + response_id: 'FIELD_INVALID_CHOICE', + code: 400, + callable: function () { + $test_model = new NetworkInterface(); + $test_model->typev6->value = 'dhcp6'; + $test_model->dhcp6_ia_pd_len->value = '999'; + }, + ); + } } From 494615fc034a3dd904183697a024a244bd59b836 Mon Sep 17 00:00:00 2001 From: Jared Hendrickson Date: Wed, 18 Nov 2026 18:21:38 -0700 Subject: [PATCH 04/17] docs: update default version in README install commands --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3687aa56c..795409ee7 100644 --- a/README.md +++ b/README.md @@ -36,13 +36,13 @@ commands are included below for quick reference. Install on pfSense CE: ```bash -pkg-static add https://github.com/pfrest/pfSense-pkg-RESTAPI/releases/latest/download/pfSense-2.8.1-pkg-RESTAPI.pkg +pkg-static add https://github.com/pfrest/pfSense-pkg-RESTAPI/releases/latest/download/pfSense-2.9.1-pkg-RESTAPI.pkg ``` Install on pfSense Plus: ```bash -pkg-static -C /dev/null add https://github.com/pfrest/pfSense-pkg-RESTAPI/releases/latest/download/pfSense-26.03.1-pkg-RESTAPI.pkg +pkg-static -C /dev/null add https://github.com/pfrest/pfSense-pkg-RESTAPI/releases/latest/download/pfSense-26.07.1-pkg-RESTAPI.pkg ``` > [!WARNING] From aa7e18743283727252992fa848b8167988c53cec Mon Sep 17 00:00:00 2001 From: Jared Hendrickson Date: Wed, 18 Nov 2026 18:27:16 -0700 Subject: [PATCH 05/17] docs: add notice that this project is reaching eol --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 795409ee7..c07f518a2 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,10 @@ The pfSense REST API package is an unofficial, open-source REST and GraphQL API firewalls. It is designed to be light-weight, fast, and easy to use. This guide will help you get started with the REST API package and provide you with the information you need to configure and use the package effectively. +> [!IMPORTANT] +> This project will soon come to end. For more information on the path forward and migration to the official +> pfSense API, please refer to the [announcement](https://github.com/pfrest/pfSense-pkg-RESTAPI/discussions/962). + ## Key Features - 200+ REST endpoints available for managing your firewall and associated services From 89144f6859a4a0cb66db2d712e20da06f88b7788 Mon Sep 17 00:00:00 2001 From: Jared Hendrickson Date: Wed, 18 Nov 2026 18:29:33 -0700 Subject: [PATCH 06/17] feat: support pfSense CE 2.9.1 and Plus 26.07.1 --- .github/workflows/build.yml | 2 ++ .github/workflows/release.yml | 4 ++++ docs/INSTALL_AND_CONFIG.md | 2 ++ 3 files changed, 8 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81ab3140c..32f000840 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -136,6 +136,8 @@ jobs: FREEBSD_ID: freebsd15 - PFSENSE_VERSION: pfSense-2.9.0-RELEASE FREEBSD_ID: freebsd16 + - PFSENSE_VERSION: pfSense-2.9.1-RELEASE + FREEBSD_ID: freebsd16 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5835c31c9..8a4b318e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,6 +30,8 @@ jobs: PFSENSE_VERSION: "2.8.1" - FREEBSD_VERSION: FreeBSD-16.0-CURRENT PFSENSE_VERSION: "2.9.0" + - FREEBSD_VERSION: FreeBSD-16.0-CURRENT + PFSENSE_VERSION: "2.9.1" - FREEBSD_VERSION: FreeBSD-16.0-CURRENT PFSENSE_VERSION: "25.11.1" - FREEBSD_VERSION: FreeBSD-16.0-CURRENT @@ -38,6 +40,8 @@ jobs: PFSENSE_VERSION: "26.03.1" - FREEBSD_VERSION: FreeBSD-16.0-CURRENT PFSENSE_VERSION: "26.07" + - FREEBSD_VERSION: FreeBSD-16.0-CURRENT + PFSENSE_VERSION: "26.07.1" steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/docs/INSTALL_AND_CONFIG.md b/docs/INSTALL_AND_CONFIG.md index a7c5ebfed..63e2d042d 100644 --- a/docs/INSTALL_AND_CONFIG.md +++ b/docs/INSTALL_AND_CONFIG.md @@ -16,10 +16,12 @@ run pfSense. It's recommended to follow Netgate's [minimum hardware requirements - pfSense CE 2.8.1 - pfSense CE 2.9.0 +- pfSense CE 2.9.1 - pfSense Plus 25.11.1 - pfSense Plus 26.03 - pfSense Plus 26.03.1 - pfSense Plus 26.07 +- pfSense Plus 26.07.1 !!! Warning Installation of the package on unsupported versions of pfSense may result in unexpected behavior and/or system instability. From c34558f1fa372ed909765d9948250f205ee46b70 Mon Sep 17 00:00:00 2001 From: Jared Hendrickson Date: Wed, 18 Nov 2026 18:29:40 -0700 Subject: [PATCH 07/17] style: run prettier on changed files --- README.md | 2 +- .../pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c07f518a2..8d559724c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ firewalls. It is designed to be light-weight, fast, and easy to use. This guide API package and provide you with the information you need to configure and use the package effectively. > [!IMPORTANT] -> This project will soon come to end. For more information on the path forward and migration to the official +> This project will soon come to end. For more information on the path forward and migration to the official > pfSense API, please refer to the [announcement](https://github.com/pfrest/pfSense-pkg-RESTAPI/discussions/962). ## Key Features diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc index a3359adf5..6986bae7a 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc @@ -916,7 +916,7 @@ class APIModelsNetworkInterfaceTestCase extends TestCase { }, ); } - + /** * Checks that dhcp6_ia_pd_len accepts the GUI choices ('none' and the * 16..0 IA-PD lengths) and rejects out-of-set values. From f41a95427dc599d7d145bb89b47efdd00506b746 Mon Sep 17 00:00:00 2001 From: Jared Hendrickson Date: Wed, 18 Nov 2026 19:25:17 -0700 Subject: [PATCH 08/17] test(NetworkInterface): fix broken NetworkInterface tests --- .../RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc index 6986bae7a..30d22580c 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc @@ -881,7 +881,7 @@ class APIModelsNetworkInterfaceTestCase extends TestCase { * Checks that a NEW descr value violating filter-name rules is rejected * (FilterNameValidator now runs in validate_descr for changed values). */ - public function test_descr_new_value_rejects_reserved_name() { + public function test_descr_new_value_rejects_reserved_name(): void { $this->assert_throws_response( response_id: 'FILTER_NAME_VALIDATOR_RESERVED_NAME_USED', code: 400, @@ -899,7 +899,7 @@ class APIModelsNetworkInterfaceTestCase extends TestCase { * revalidates every field on PATCH; validating an unchanged value * locked whole interfaces whose descr predates the rules). */ - public function test_descr_unchanged_legacy_value_not_revalidated() { + public function test_descr_unchanged_legacy_value_not_revalidated(): void { $this->assert_does_not_throw( callable: function () { $test_model = new NetworkInterface(); @@ -921,12 +921,13 @@ class APIModelsNetworkInterfaceTestCase extends TestCase { * Checks that dhcp6_ia_pd_len accepts the GUI choices ('none' and the * 16..0 IA-PD lengths) and rejects out-of-set values. */ - public function test_dhcp6_ia_pd_len_choices() { + public function test_dhcp6_ia_pd_len_choices(): void { $this->assert_does_not_throw( callable: function () { $test_model = new NetworkInterface(); $test_model->typev6->value = 'dhcp6'; $test_model->dhcp6_ia_pd_len->value = '0'; + $test_model->dhcp6_ia_pd_len->validate(); }, ); @@ -935,6 +936,7 @@ class APIModelsNetworkInterfaceTestCase extends TestCase { $test_model = new NetworkInterface(); $test_model->typev6->value = 'dhcp6'; $test_model->dhcp6_ia_pd_len->value = 'none'; + $test_model->dhcp6_ia_pd_len->validate(); }, ); @@ -945,6 +947,7 @@ class APIModelsNetworkInterfaceTestCase extends TestCase { $test_model = new NetworkInterface(); $test_model->typev6->value = 'dhcp6'; $test_model->dhcp6_ia_pd_len->value = '999'; + $test_model->dhcp6_ia_pd_len->validate(); }, ); } From 8d3d19b08fa97f450b72ca7af3d0967c32c5a825 Mon Sep 17 00:00:00 2001 From: Jared Hendrickson Date: Wed, 18 Nov 2026 20:15:42 -0700 Subject: [PATCH 09/17] test(NetworkInterface): fix broken interface descr length test --- .../pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc index 30d22580c..0ed4707b1 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc @@ -52,7 +52,7 @@ class APIModelsNetworkInterfaceTestCase extends TestCase { $test_model->if->value = 'ovpn1'; # Ensure the validation succeeds when value is an acceptable length - $test_model->validate_descr('length is ok'); + $test_model->validate_descr('lengthisok'); }, ); } From c4c80d53963260020a72daa17dc1e4f6edcbb8e3 Mon Sep 17 00:00:00 2001 From: Jared Hendrickson Date: Wed, 18 Nov 2026 21:30:36 -0700 Subject: [PATCH 10/17] test(NetworkInterface): fix additional broken interface length tests --- .../pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc index 0ed4707b1..d35ffc891 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc @@ -82,7 +82,7 @@ class APIModelsNetworkInterfaceTestCase extends TestCase { $test_model->if->value = 'ipsec1'; # Ensure the validation succeeds when value is an acceptable length - $test_model->validate_descr('length is ok'); + $test_model->validate_descr('lengthisok'); }, ); } @@ -112,7 +112,7 @@ class APIModelsNetworkInterfaceTestCase extends TestCase { $test_model->if->value = 'gif1'; # Ensure the validation succeeds when value is an acceptable length - $test_model->validate_descr('length is ok'); + $test_model->validate_descr('lengthisok'); }, ); } From 81b1b309078901f12a8740fd4cf518da371cd832 Mon Sep 17 00:00:00 2001 From: Jared Hendrickson Date: Thu, 19 Nov 2026 15:57:23 -0700 Subject: [PATCH 11/17] test(NetworkInterface): fix additional broken interface length tests --- .../pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc index d35ffc891..af01b0aa1 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsNetworkInterfaceTestCase.inc @@ -142,7 +142,7 @@ class APIModelsNetworkInterfaceTestCase extends TestCase { $test_model->if->value = 'gre1'; # Ensure the validation succeeds when value is an acceptable length - $test_model->validate_descr('length is ok'); + $test_model->validate_descr('lengthisok'); }, ); } From 1559ad26bde5297976b20d0d8c618e8674d51490 Mon Sep 17 00:00:00 2001 From: Jared Hendrickson Date: Thu, 19 Nov 2026 16:42:55 -0700 Subject: [PATCH 12/17] ci: update python version used in release workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a4b318e6..12643a2d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ concurrency: build # Sets global environment variables for releases env: SWAGGER_UI_VERSION: "5.17.10" - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.14" DEFAULT_PFSENSE_VERSION: "2.9.0" # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages From aca4a6b986867a3c1af20adc9b00c2ab0b6d1dcd Mon Sep 17 00:00:00 2001 From: Jared Hendrickson Date: Thu, 19 Nov 2026 16:43:33 -0700 Subject: [PATCH 13/17] ci: update python version used in quality workflow --- .github/workflows/quality.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 84b20eb83..d745bcd26 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -44,7 +44,7 @@ jobs: needs: ["check_black"] strategy: matrix: - PYTHON_VERSION: ["3.10", "3.11"] + PYTHON_VERSION: ["3.14"] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Python ${{ matrix.PYTHON_VERSION }} From a2eecf94718b5d61747a245a1449d0d48b6f0cbe Mon Sep 17 00:00:00 2001 From: Jared Hendrickson Date: Thu, 19 Nov 2026 16:44:25 -0700 Subject: [PATCH 14/17] ci: source oas schema from 2.9.0 in quality workflow --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32f000840..059e8ab25 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -105,7 +105,7 @@ jobs: strategy: matrix: include: - - PFSENSE_VERSION: pfSense-2.8.1-RELEASE + - PFSENSE_VERSION: pfSense-2.9.0-RELEASE FREEBSD_ID: freebsd15 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 From 06364096f65188850986524c06b7a14253121c62 Mon Sep 17 00:00:00 2001 From: Jared Hendrickson Date: Thu, 19 Nov 2026 23:00:22 -0700 Subject: [PATCH 15/17] feat: support pfSense CE 2.9.2 and Plus 26.07.2 --- .github/workflows/build.yml | 2 ++ .github/workflows/release.yml | 4 ++++ README.md | 4 ++-- docs/INSTALL_AND_CONFIG.md | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 059e8ab25..66219be0b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -138,6 +138,8 @@ jobs: FREEBSD_ID: freebsd16 - PFSENSE_VERSION: pfSense-2.9.1-RELEASE FREEBSD_ID: freebsd16 + - PFSENSE_VERSION: pfSense-2.9.2-RELEASE + FREEBSD_ID: freebsd16 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12643a2d7..3177ef269 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,6 +32,8 @@ jobs: PFSENSE_VERSION: "2.9.0" - FREEBSD_VERSION: FreeBSD-16.0-CURRENT PFSENSE_VERSION: "2.9.1" + - FREEBSD_VERSION: FreeBSD-16.0-CURRENT + PFSENSE_VERSION: "2.9.2" - FREEBSD_VERSION: FreeBSD-16.0-CURRENT PFSENSE_VERSION: "25.11.1" - FREEBSD_VERSION: FreeBSD-16.0-CURRENT @@ -42,6 +44,8 @@ jobs: PFSENSE_VERSION: "26.07" - FREEBSD_VERSION: FreeBSD-16.0-CURRENT PFSENSE_VERSION: "26.07.1" + - FREEBSD_VERSION: FreeBSD-16.0-CURRENT + PFSENSE_VERSION: "26.07.2" steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/README.md b/README.md index 8d559724c..25440f877 100644 --- a/README.md +++ b/README.md @@ -40,13 +40,13 @@ commands are included below for quick reference. Install on pfSense CE: ```bash -pkg-static add https://github.com/pfrest/pfSense-pkg-RESTAPI/releases/latest/download/pfSense-2.9.1-pkg-RESTAPI.pkg +pkg-static add https://github.com/pfrest/pfSense-pkg-RESTAPI/releases/latest/download/pfSense-2.9.2-pkg-RESTAPI.pkg ``` Install on pfSense Plus: ```bash -pkg-static -C /dev/null add https://github.com/pfrest/pfSense-pkg-RESTAPI/releases/latest/download/pfSense-26.07.1-pkg-RESTAPI.pkg +pkg-static -C /dev/null add https://github.com/pfrest/pfSense-pkg-RESTAPI/releases/latest/download/pfSense-26.07.2-pkg-RESTAPI.pkg ``` > [!WARNING] diff --git a/docs/INSTALL_AND_CONFIG.md b/docs/INSTALL_AND_CONFIG.md index 63e2d042d..3463da6d5 100644 --- a/docs/INSTALL_AND_CONFIG.md +++ b/docs/INSTALL_AND_CONFIG.md @@ -17,11 +17,13 @@ run pfSense. It's recommended to follow Netgate's [minimum hardware requirements - pfSense CE 2.8.1 - pfSense CE 2.9.0 - pfSense CE 2.9.1 +- pfSense CE 2.9.2 - pfSense Plus 25.11.1 - pfSense Plus 26.03 - pfSense Plus 26.03.1 - pfSense Plus 26.07 - pfSense Plus 26.07.1 +- pfSense Plus 26.07.2 !!! Warning Installation of the package on unsupported versions of pfSense may result in unexpected behavior and/or system instability. From a7f7039f244545deef91887f161fde8915f253c6 Mon Sep 17 00:00:00 2001 From: Jared Hendrickson Date: Fri, 20 Nov 2026 08:42:03 -0700 Subject: [PATCH 16/17] ci: check oas schema with correct pf version --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66219be0b..746c744a7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,7 +57,7 @@ jobs: strategy: matrix: include: - - PFSENSE_VERSION: pfSense-2.8.1-RELEASE + - PFSENSE_VERSION: pfSense-2.9.0-RELEASE FREEBSD_ID: freebsd15 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 From 938a73375f26ec883dd872c0b673de1d69d8b367 Mon Sep 17 00:00:00 2001 From: Jared Hendrickson Date: Fri, 20 Nov 2026 09:24:03 -0700 Subject: [PATCH 17/17] ci: correct freebsd version in oas checks --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 746c744a7..0ac013745 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,7 +58,7 @@ jobs: matrix: include: - PFSENSE_VERSION: pfSense-2.9.0-RELEASE - FREEBSD_ID: freebsd15 + FREEBSD_ID: freebsd16 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 @@ -106,7 +106,7 @@ jobs: matrix: include: - PFSENSE_VERSION: pfSense-2.9.0-RELEASE - FREEBSD_ID: freebsd15 + FREEBSD_ID: freebsd16 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2