Skip to content

Commit 0ea15d1

Browse files
Merge pull request #937 from pfrest/next_patch
v2.10.1 Features & Fixes
2 parents 805c7f0 + 19cd349 commit 0ea15d1

11 files changed

Lines changed: 220 additions & 57 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ jobs:
134134
include:
135135
- PFSENSE_VERSION: pfSense-2.8.1-RELEASE
136136
FREEBSD_ID: freebsd15
137+
- PFSENSE_VERSION: pfSense-2.9.0-RELEASE
138+
FREEBSD_ID: freebsd16
137139

138140
steps:
139141
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

‎.github/workflows/release.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ concurrency: build
1010
env:
1111
SWAGGER_UI_VERSION: "5.17.10"
1212
PYTHON_VERSION: "3.10"
13-
DEFAULT_PFSENSE_VERSION: "2.8.1"
13+
DEFAULT_PFSENSE_VERSION: "2.9.0"
1414

1515
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1616
permissions:
@@ -28,12 +28,16 @@ jobs:
2828
# Note: The first item in this matrix must use env.DEFAULT_PFSENSE_VERSION as the PFSENSE_VERSION!
2929
- FREEBSD_VERSION: FreeBSD-15.0-CURRENT
3030
PFSENSE_VERSION: "2.8.1"
31+
- FREEBSD_VERSION: FreeBSD-15.0-CURRENT
32+
PFSENSE_VERSION: "2.9.0"
3133
- FREEBSD_VERSION: FreeBSD-16.0-CURRENT
3234
PFSENSE_VERSION: "25.11.1"
3335
- FREEBSD_VERSION: FreeBSD-16.0-CURRENT
3436
PFSENSE_VERSION: "26.03"
3537
- FREEBSD_VERSION: FreeBSD-16.0-CURRENT
3638
PFSENSE_VERSION: "26.03.1"
39+
- FREEBSD_VERSION: FreeBSD-16.0-CURRENT
40+
PFSENSE_VERSION: "26.07"
3741

3842
steps:
3943
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

‎docs/INSTALL_AND_CONFIG.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ run pfSense. It's recommended to follow Netgate's [minimum hardware requirements
1515
### Supported pfSense versions
1616

1717
- pfSense CE 2.8.1
18+
- pfSense CE 2.9.0
1819
- pfSense Plus 25.11.1
1920
- pfSense Plus 26.03
2021
- pfSense Plus 26.03.1
21-
22+
- pfSense Plus 26.07
2223

2324
!!! Warning
2425
Installation of the package on unsupported versions of pfSense may result in unexpected behavior and/or system instability.

‎pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Core/Model.inc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ class Model {
800800
# Clear the object cache for all Model classes since config is being reloaded
801801
self::clear_model_cache();
802802

803-
$config = parse_config(parse: $force_parse);
803+
config_read_file();
804804
}
805805

806806
/**

‎pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Dispatchers/FirewallApplyDispatcher.inc‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace RESTAPI\Dispatchers;
44

5+
use RESTAPI\Core\Command;
56
use RESTAPI\Core\Dispatcher;
67

78
/**
@@ -12,10 +13,6 @@ class FirewallApplyDispatcher extends Dispatcher {
1213
* Reloads the filter services.
1314
*/
1415
protected function _process(mixed ...$arguments): void {
15-
if ($this->async) {
16-
filter_configure();
17-
} else {
18-
filter_configure_sync();
19-
}
16+
new Command('/etc/rc.filter_configure_sync');
2017
}
2118
}

‎pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/DHCPServer.inc‎

Lines changed: 83 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use RESTAPI\Responses\ConflictError;
1717
use RESTAPI\Responses\ValidationError;
1818
use RESTAPI\Validators\IPAddressValidator;
1919
use RESTAPI\Validators\MACAddressValidator;
20+
use RESTAPI\Validators\URLValidator;
2021

2122
/**
2223
* Defines a Model that interacts with the DHCP server for a given interface.
@@ -48,6 +49,15 @@ class DHCPServer extends Model {
4849
public NestedModelField $pool;
4950
public NestedModelField $numberoptions;
5051
public NestedModelField $staticmap;
52+
public BooleanField $netboot;
53+
public StringField $nextserver;
54+
public StringField $filename;
55+
public StringField $filename32;
56+
public StringField $filename64;
57+
public StringField $filename32arm;
58+
public StringField $filename64arm;
59+
public StringField $uefihttpboot;
60+
public StringField $rootpath;
5161

5262
public function __construct(mixed $id = null, mixed $parent_id = null, mixed $data = [], mixed ...$options) {
5363
# Define Model attributes
@@ -78,21 +88,21 @@ class DHCPServer extends Model {
7888
default: '',
7989
allow_empty: true,
8090
maximum_length: 15,
91+
verbose_name: 'Range From',
8192
internal_name: 'from',
8293
internal_namespace: 'range',
8394
validators: [new IPAddressValidator(allow_ipv4: true, allow_ipv6: false)],
84-
verbose_name: 'Range From',
8595
help_text: 'The starting IP address for the primary DHCP pool. This address must be less than or equal ' .
8696
'to the `range_to` field.',
8797
);
8898
$this->range_to = new StringField(
8999
default: '',
90100
allow_empty: true,
91101
maximum_length: 15,
102+
verbose_name: 'Range To',
92103
internal_name: 'to',
93104
internal_namespace: 'range',
94105
validators: [new IPAddressValidator(allow_ipv4: true, allow_ipv6: false)],
95-
verbose_name: 'Range To',
96106
help_text: 'The ending IP address for the primary DHCP pool. This address must be greater than or equal ' .
97107
'to the `range_to` field.',
98108
);
@@ -107,8 +117,8 @@ class DHCPServer extends Model {
107117
default: '',
108118
allow_empty: true,
109119
maximum_length: 255,
110-
validators: [new IPAddressValidator(allow_ipv4: true, allow_ipv6: true, allow_fqdn: true)],
111120
verbose_name: 'Failover Peer IP',
121+
validators: [new IPAddressValidator(allow_ipv4: true, allow_ipv6: true, allow_fqdn: true)],
112122
help_text: 'The interface IP address of the other firewall (failover peer) in this subnet. Leave ' .
113123
'empty to disable failover peering.',
114124
);
@@ -117,17 +127,17 @@ class DHCPServer extends Model {
117127
allow_empty: true,
118128
many: true,
119129
maximum_length: 17,
120-
validators: [new MACAddressValidator()],
121130
verbose_name: 'MAC Allow',
131+
validators: [new MACAddressValidator()],
122132
help_text: 'MAC addresses this DHCP server is allowed to provide leases for.',
123133
);
124134
$this->mac_deny = new StringField(
125135
default: [],
126136
allow_empty: true,
127137
many: true,
128138
maximum_length: 17,
129-
validators: [new MACAddressValidator()],
130139
verbose_name: 'MAC Deny',
140+
validators: [new MACAddressValidator()],
131141
help_text: 'MAC addresses this DHCP server is not allowed to provide leases for.',
132142
);
133143
$this->domainsearchlist = new StringField(
@@ -136,8 +146,8 @@ class DHCPServer extends Model {
136146
many: true,
137147
maximum_length: 255,
138148
delimiter: ';',
139-
validators: [new IPAddressValidator(allow_ipv4: false, allow_ipv6: false, allow_fqdn: true)],
140149
verbose_name: 'Domain Search List',
150+
validators: [new IPAddressValidator(allow_ipv4: false, allow_ipv6: false, allow_fqdn: true)],
141151
help_text: 'The domain search list to provide via DHCP.',
142152
);
143153
$this->defaultleasetime = new IntegerField(
@@ -159,8 +169,8 @@ class DHCPServer extends Model {
159169
default: '',
160170
allow_empty: true,
161171
maximum_length: 15,
162-
validators: [new IPAddressValidator(allow_ipv4: true, allow_ipv6: false, allow_keywords: ['none'])],
163172
verbose_name: 'Gateway',
173+
validators: [new IPAddressValidator(allow_ipv4: true, allow_ipv6: false, allow_keywords: ['none'])],
164174
help_text: 'The gateway IPv4 address to provide via DHCP. This is only necessary if you are not using ' .
165175
"the interface's IP as the gateway. Specify `none` for no gateway assignment.",
166176
);
@@ -171,8 +181,8 @@ class DHCPServer extends Model {
171181
many_maximum: 4,
172182
maximum_length: 15,
173183
delimiter: null,
174-
validators: [new IPAddressValidator(allow_ipv4: true, allow_ipv6: false)],
175184
verbose_name: 'DNS Servers',
185+
validators: [new IPAddressValidator(allow_ipv4: true, allow_ipv6: false)],
176186
help_text: 'The DNS servers to provide via DHCP. Leave empty to default to system nameservers.',
177187
);
178188
$this->winsserver = new StringField(
@@ -182,8 +192,8 @@ class DHCPServer extends Model {
182192
many_maximum: 2,
183193
maximum_length: 15,
184194
delimiter: null,
185-
validators: [new IPAddressValidator(allow_ipv4: true, allow_ipv6: false)],
186195
verbose_name: 'WINS Servers',
196+
validators: [new IPAddressValidator(allow_ipv4: true, allow_ipv6: false)],
187197
help_text: 'The WINS servers to provide via DHCP.',
188198
);
189199
$this->ntpserver = new StringField(
@@ -193,8 +203,8 @@ class DHCPServer extends Model {
193203
many_maximum: 4,
194204
maximum_length: 256,
195205
delimiter: null,
196-
validators: [new IPAddressValidator(allow_ipv4: true, allow_ipv6: false, allow_fqdn: true)],
197206
verbose_name: 'NTP Servers',
207+
validators: [new IPAddressValidator(allow_ipv4: true, allow_ipv6: false, allow_fqdn: true)],
198208
help_text: 'The NTP servers to provide via DHCP.',
199209
);
200210
$this->staticarp = new BooleanField(
@@ -273,6 +283,69 @@ class DHCPServer extends Model {
273283
verbose_name: 'Static Mappings',
274284
help_text: 'Static mappings applied to this DHCP server.',
275285
);
286+
$this->netboot = new BooleanField(
287+
default: false,
288+
verbose_name: 'Enable Network Booting',
289+
help_text: 'Enable network booting (PXE/TFTP/UEFI HTTP boot) options for this DHCP server.',
290+
);
291+
$this->nextserver = new StringField(
292+
default: '',
293+
allow_empty: true,
294+
verbose_name: 'Next Server',
295+
conditions: ['netboot' => true],
296+
validators: [new IPAddressValidator(allow_ipv4: true, allow_ipv6: false)],
297+
help_text: 'The IPv4 address of the network boot server (e.g. TFTP server).',
298+
);
299+
$this->filename = new StringField(
300+
default: '',
301+
allow_empty: true,
302+
verbose_name: 'Default Bootfile Name',
303+
conditions: ['netboot' => true],
304+
help_text: 'The default bootfile name provided to BIOS/legacy PXE clients.',
305+
);
306+
$this->filename32 = new StringField(
307+
default: '',
308+
allow_empty: true,
309+
verbose_name: 'UEFI 32-bit Bootfile Name',
310+
conditions: ['netboot' => true],
311+
help_text: 'The bootfile name provided to 32-bit UEFI PXE clients.',
312+
);
313+
$this->filename64 = new StringField(
314+
default: '',
315+
allow_empty: true,
316+
verbose_name: 'UEFI 64-bit Bootfile Name',
317+
conditions: ['netboot' => true],
318+
help_text: 'The bootfile name provided to 64-bit UEFI PXE clients.',
319+
);
320+
$this->filename32arm = new StringField(
321+
default: '',
322+
allow_empty: true,
323+
verbose_name: 'UEFI 32-bit ARM Bootfile Name',
324+
conditions: ['netboot' => true],
325+
help_text: 'The bootfile name provided to 32-bit ARM UEFI PXE clients.',
326+
);
327+
$this->filename64arm = new StringField(
328+
default: '',
329+
allow_empty: true,
330+
verbose_name: 'UEFI 64-bit ARM Bootfile Name',
331+
conditions: ['netboot' => true],
332+
help_text: 'The bootfile name provided to 64-bit ARM UEFI PXE clients.',
333+
);
334+
$this->uefihttpboot = new StringField(
335+
default: '',
336+
allow_empty: true,
337+
verbose_name: 'UEFI HTTPBoot URL',
338+
conditions: ['netboot' => true],
339+
validators: [new URLValidator()],
340+
help_text: 'The URL provided to UEFI HTTP boot clients.',
341+
);
342+
$this->rootpath = new StringField(
343+
default: '',
344+
allow_empty: true,
345+
verbose_name: 'Root Path',
346+
conditions: ['netboot' => true],
347+
help_text: 'The root path provided to network boot clients.',
348+
);
276349

277350
parent::__construct($id, $parent_id, $data, ...$options);
278351
}

‎pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/RESTAPIVersion.inc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class RESTAPIVersion extends Model {
127127
# Locate the version and format it to a standard semantic version format (x.x.x)
128128
$version = str_replace(' ', '', $pkg_line);
129129
$version = explode(':', $version)[1];
130-
$version = strlen($version) === 3 ? $version . '.0' : $version;
130+
$version = substr_count($version, '.') === 1 ? $version . '.0' : $version;
131131
$version = str_replace('_', '.', $version);
132132
return "v$version";
133133
}

‎pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsCertificateAuthorityTestCase.inc‎

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -98,37 +98,6 @@ R02Pul8ulWQ8Kl3Q3pou8As7W1mMzA2DxQ==
9898
);
9999
}
100100

101-
/**
102-
* Checks that the CA is found in the OS trust store when `trust` is enabled.
103-
*/
104-
public function test_ca_trust() {
105-
# Create a CA to test with
106-
$ca = new CertificateAuthority(
107-
data: [
108-
'descr' => 'test',
109-
'crt' => self::EXAMPLE_CRT,
110-
'prv' => self::EXAMPLE_PRV,
111-
'trust' => true,
112-
],
113-
);
114-
$ca->create();
115-
116-
# Ensure the cert is in the trust store directory
117-
$truststore_dir_ls = glob('/usr/local/etc/ssl/certs/*.crt');
118-
$this->assert_is_not_empty($truststore_dir_ls, message: 'Trust store directory should have one trusted CA!');
119-
120-
# Disable `trust`
121-
$ca->trust->value = false;
122-
$ca->update();
123-
124-
# Ensure the certificate is not found in the trust store
125-
$truststore_dir_ls = glob('/usr/local/etc/ssl/certs/*.crt');
126-
$this->assert_is_empty($truststore_dir_ls, message: 'Trust store directory should have no trusted CAs!');
127-
128-
# Delete the CA
129-
$ca->delete();
130-
}
131-
132101
/**
133102
* Checks that we cannot delete a CA that is in use.
134103
*/

0 commit comments

Comments
 (0)