Commit graph

20207 commits

Author SHA1 Message Date
Ad Schellevis
45b90a2f24 System: Access: Groups - fix regression in selective delete introduced in https://github.com/opnsense/core/pull/9779 2026-05-27 13:17:32 +02:00
Ad Schellevis
aac399ee26 Interfaces: Devices: VLAN - fix regression in selective delete introduced in https://github.com/opnsense/core/pull/9779 2026-05-27 13:11:47 +02:00
Ad Schellevis
2a690f1521 Interfaces: Devices: LAGG - fix regression in selective delete introduced in https://github.com/opnsense/core/pull/9779 2026-05-27 12:03:49 +02:00
Ad Schellevis
1bce09c165 Interfaces: Devices: GRE - fix regression in selective delete introduced in https://github.com/opnsense/core/pull/9779 2026-05-27 11:58:29 +02:00
Ad Schellevis
f4706755ba Interfaces: Devices: GIF - fix regression in selective delete introduced in https://github.com/opnsense/core/pull/9779 2026-05-27 11:34:07 +02:00
Stephan de Wit
0b128cd642
Reporting: Settings: convert to MVC (#10337)
Move all relevant toggles and actions to their respective pages with associated forms and endpoints.

Removes the Netflow Repair button as well.
2026-05-27 10:49:06 +02:00
Stephan de Wit
3986018989 ui: SimpleActionButton exclude scope should apply to first active tab as well 2026-05-27 09:45:21 +02:00
Ad Schellevis
09654ca796 ACL: some missing references and using camelcase pointers instead of snakecase [ref: https://github.com/opnsense/core/issues/10351] 2026-05-25 10:23:56 +02:00
Ad Schellevis
dcb01791f7 Firewall: Settings: Normalization - add missing exclamation mark for "not" rules, closes https://github.com/opnsense/core/issues/10349 2026-05-24 13:33:51 +02:00
Ad Schellevis
6ffad1bb73 Firewall - fix interface sortng by value for live-log and groups, closes https://github.com/opnsense/core/issues/10348
We might consider moving the sorting logic to BaseListField at some point as most cases expect sort by value anyway and we only have a couple of exceptions to that logic.
2026-05-24 10:18:20 +02:00
Ian Munsie
e209de9719
Kea: Hook up reservation.next_server (#10344)
This field was added to the Kea dialogReservation4.xml form in
https://github.com/opnsense/core/pull/8890, however this specific option
was not properly hooked up and did not generate the expected config,
preventing netboot scenarios that rely on next-server from being set on
a per-reservation basis (the per-subnet variant of this option does work
fine).

This commit hooks it up to generate the expected "next-server" Kea
config entry on a per-reservation basis.
2026-05-23 08:52:58 +02:00
Monviech
720c791b15
Services: Kea DHCPv4/6: Fix missing visual cues for manual mode in DDNS and DHCPv4/6 (#10340) 2026-05-22 13:44:28 +02:00
Monviech
e38a6980f1
mvc: remove grouped ModelRelationField option handling (#10339)
The group option collapsed multiple related model rows into a single
display entry while still storing the UUID of one concrete source row.
This makes the selected relation dependent on iteration order and is not
a stable representation of the grouped object.

References:
fe571ac442

Frr was the only consumer (I could grep in core and plugins, don't know if external ones exist), I reworked how the relationship is displayed there to make it more obvious to the user how items relate to each other, and also prevent that the wrong items get deleted. Configs should be more coherent now.

It's also not perfect, but more "obvious" lets say.
It also helps with the addition of internalModelUseSafeDelete in FRR.

opnsense/plugins@0798cde
opnsense/plugins@d3c3e79
opnsense/plugins@cb9a5d6
2026-05-22 13:01:27 +02:00
Franco Fichtner
cea2938254 ui: split button render, some forms only use save
This makes it reusable so we can replace other "save" buttons
that don't follow striping correctly.
2026-05-22 12:15:53 +02:00
Franco Fichtner
a87b496d67 kea: simplify previous 2026-05-22 11:55:57 +02:00
Franco Fichtner
82060be3a5 Revert "ui: lazily hook settings-changed trigger in saveFormToEndpoint()"
This reverts commit e4dc9ad212.
This reverts commit 45ef8ddd1a.

The current approach is fine since it is not the default behaviour to
use change() to save the form.

Discussed with: @swhite2
2026-05-22 11:31:40 +02:00
Franco Fichtner
3f78821cb0 dnsmasq: fix option values 2026-05-21 21:05:38 +02:00
Franco Fichtner
5629b0023b monit: remove duplication from these strange test types
tests.xml doesn't list the field so none of this is ever shown
and most could probably be removed, but I have no idea how this
is supposed to work.  The default type is pinned to Custom.
2026-05-21 21:00:39 +02:00
Franco Fichtner
672ebf5aec system: simplify option values in trust 2026-05-21 20:41:21 +02:00
Franco Fichtner
336ac4ebc5 intrusion detection: clean up option values 2026-05-21 20:38:21 +02:00
Franco Fichtner
a9dee3dcff openvpn: clean up these option values
Push flags not always mention "push" in label but their
context is clear and keys do not change so simplify.
2026-05-21 20:35:08 +02:00
Franco Fichtner
72403e4ace interfaces: simplify VLAN type selection
Although 802.1Q is correct we don't need the translation
and can make all of it a bit shorter.
2026-05-21 18:08:30 +02:00
Stephan de Wit
ac55f108c5 unbound: trim option values
This works since b187227683
2026-05-21 13:53:50 +02:00
Franco Fichtner
7484d4ba6b firewall: this works and I don't get it 2026-05-21 13:25:30 +02:00
Franco Fichtner
251559ed6a src: expand lint and fix a few easy ones 2026-05-21 13:16:29 +02:00
Marcos Della
73df87682c
Services: Kea DHCPv4: Add DHCP4 compatibility options (#10336)
Refs: https://kea.readthedocs.io/en/stable/arm/dhcp4-srv.html#dhcp4-compatibility"

Co-authored-by: Franco Fichtner <franco@lastsummer.de>
Co-authored-by: Monviech <79600909+Monviech@users.noreply.github.com>
2026-05-21 11:14:18 +02:00
Konstantinos Spartalis
d7f455bdfb
unbound: blocklist improvements (#10149)
* Organizes DNSBLs by provider/category.
* Adds the Social Network blocklist by hegizi.
* The tester now gives you the DNSBL name and category instead of its shortcode.
2026-05-21 11:13:21 +02:00
Franco Fichtner
8ae0a6c158 make: add linter pass for the situation b187227683 addresses 2026-05-21 10:15:44 +02:00
Franco Fichtner
b187227683 mvc: OptionField: allow empty values in options
This falls back to the key which isn't going to be translated
since it's likely a technical term or keyword.

Also translate the $subvalue which appears to have been missed
before.
2026-05-21 10:00:08 +02:00
Franco Fichtner
546de351d7
ui: improve form validation error append (#10333)
Since this iterates over a lot of irrelevant IDs and then mismatches
with the target change this by safeguarding against fields that are
likely not going to work without help_block_<id> and switch target
to a suffix match.

One spot where this matters: under kea v6 subnet add "DNS servers"
entry e.g. "::", click auto collect for check mark, click save. Interface
and subnet validation is red, the DNS server one shown is not.
2026-05-20 19:18:25 +02:00
Franco Fichtner
5c51ecdee1 kea: align newwanip hook with reality 2026-05-20 15:46:13 +02:00
Stephan de Wit
3557f8d730 bootgrid: name it what it is 2026-05-20 13:57:12 +02:00
Franco Fichtner
d741236652 firewall: whitespace 2026-05-20 13:36:59 +02:00
Ad Schellevis
ff20a2f1e7 Firewall: Rules - missed a spot in 9b8ee2a92f 2026-05-20 13:26:52 +02:00
Franco Fichtner
7d52ccfe73 kea: style sweep 2026-05-20 13:05:13 +02:00
Monviech
5b7c8e6a2f
Services: Kea DHCPv6: Dynamic prefix delegation (#10252)
* Add a dynamic_prefix key to the user-context so we know which subnet6 should be enriched in a post apply hook later

* Also add dynamic_prefix to subnet6 dialog

* Add prefix source interface and resolve current prefix via Autoconf::getPrefix

* model bump not needed anymore

* Add validations that disallow users to configure subnet value, pool value and reservations for a dynamic prefix subnet. The subnet must be empty since it is auto configured, the pool is auto configured as ::1000-::2000 and seeded with initial prefix, reservations cannot be created because that would blow up as there is no concept like partial IPv6 addresses in KEA. We always want to bootstrap KEA with an initial working configuration.

* Since the prefix_source is verbatim to a subnet, we only allow its usage once per unique constraint

* Add a mvp for the dynamic pd_pool, the pool is auto generated from the largets possible prefix that does not include the IA_NA generated address pool. Validation ensures the user can only change the delegated prefix length, but not anything about the pool itself. KEA is very strict about validations, auto generation is required here to ensure the model stays sane.

* Make prefix pool validation stricter, if only a /64 prefix exists there is nothing we can do if we offer both IA_NA and IA_PD, at least /63 would be required for one IA_NA and one IA_PD pool.

* Remove config instantiation inside loops

* Fix typo in previous

* Add comment about possible overlap between identity association and prefix delegation. Cannot be cleanly solved, and if somebody doesn't use identity associaton in interface configurations it does not make sense to arbitrary reduce the size here.

* Hide fields used for static prefix configuration if the subnet and pd_pool are dynamic.

* Add grid formatter to mark values as dynamic if they are in a dynamic subnet

* Add helper utilities for idassoc owned prefixes, and a helper in firewall util that can split a prefix into two children.

* Change all plumbing in the KEA model to use the new idassoc and util helper methods

* Small typo in previous, type should be checkbox now for the dynamic prefix

* Add more validations to prevent multiple dynamic subnets and pd_pools per interface. Fix some other small details

* Add hook script that can regenerate and reload the running kea-dhcpv6 configuration, and wipe leases assigned to dynamic subnets.

* plist-fix

* Do not call kea_generage_dhcpv6 helper directly

* Remove some unused cruft in KeaDhcpv6.php

* Update src/etc/inc/plugins.inc.d/kea.inc

Co-authored-by: Franco Fichtner <franco@opnsense.org>

* Update src/etc/inc/plugins.inc.d/kea.inc

Co-authored-by: Franco Fichtner <franco@opnsense.org>

* use nested ifs inside kea_newwanip

* Use mwexecf instead

* Always pass model into kea_generate_dhcpv6()

* Add a small guard to the pd_pool generation so it doesnt pass null into explode

* Add a temporary placeholder prefix for all idassoc interfaces that for any reason do not offer a real prefix yet

* Emit the prefix status and prefix source into the user context for troubleshooting help

* Add a new client-class that prevents any client in a subnet from getting leases as long as the subnet has a temporary placeholder prefix

* Since we always have a prefix, this validation can be relaxed

* Only evaluate the client class inside a subnet scope if its required.

* DisableCache in the subnet model relation fields so interfaces have their description

* Always run dhcpv6 newwanip hook script when dhcpv6 is enabled since it's cheap and essentially side effect free

* Since KEA logs all commands issued to its socket anyway, we can reduce some of the kea_prefix_renew logging. Streamline the STDOUT result as well.

* DHCPSRV_ONLY_IF_REQUIRED_DEPRECATED The parameter 'only-if-required' is deprecated. Use 'only-in-additional-list' instead

* Fix the NO_LEASES_PLEASE client-classes test

* Add comment about issue if interfaces vanish or become deconfigured by the user, but the KEA config is not adjusted accordingly.

* Only emit NO_LEASES_PLEASE client class conditionally if a non valid prefix exists

* Fix dynamic pd pool validation, emit calculated prefix lengths to help user

* Since one interface can have multiple subnets in IPv6 its better to group them via interface. It also helps with dynamic pools since in the same interface you could have a static ULA pool as well.

* Move subnet to logically group dynamic prefix and interface

* Mark missing option_data_autocollect feature

* Retrofit an option_data_autocollect in here, but only write parameters into the generated config, not into the persisted configuration. Via this, the DNS server can be automatically pointed to a primary IP address and change at the same time as a dynamic prefix when the hook script is executed.

* Validate that domain_search and dns_servers is empty when option_data_autocollect is used.

* Attach a grid formatter to option_data_autocollect to show if options are dynamic

* Implement track6-prefix-id to track6_prefix_range relationship to calculate available subnets

* We don't need prefix_id in the KeaDHCPv6 model anymore.

* Shorten this comment a bit, now the relationship is not dependant on later interfaces anymore directly

* Remove variable that's not reused

---------

Co-authored-by: Franco Fichtner <franco@opnsense.org>
2026-05-20 12:56:04 +02:00
Franco Fichtner
9dcd63d3e5 Revert "pkg: fix numpy version name"
This reverts commit 06291661ef.

Flippety-flop the ports tree went!
2026-05-20 11:51:09 +02:00
Monviech
b73465c9b1
Firewall: Rules [new]: Fix action, ipprotocol and protocol translations (legacy rules) (#10299)
* Firewall: Rules [new]: Fix action, ipprotocol and protocol translations. Fix Automatically generated rules category.

* Ensure translations are passed through all the way to icon formatter in view

* Ensure inet46 always shows as Any or *

* Update src/opnsense/mvc/app/models/OPNsense/Firewall/Filter.xml

Co-authored-by: Franco Fichtner <franco@opnsense.org>

* Update src/opnsense/scripts/filter/list_non_mvc_rules.php

Co-authored-by: Franco Fichtner <franco@opnsense.org>

---------

Co-authored-by: Franco Fichtner <franco@opnsense.org>
2026-05-20 11:22:54 +02:00
Franco Fichtner
e44a05a0de ipsec: move swanctl.conf download button to the tab
This aligns with the aliases actions tab.
2026-05-20 09:29:28 +02:00
Franco Fichtner
df42e1b0ec system: lowercase this one 2026-05-20 09:12:33 +02:00
Franco Fichtner
ff8481265d make: add a `wiff' target for fun and profit 2026-05-19 18:42:43 +02:00
Franco Fichtner
c5f2af18e8 interfaces: add prefix range option for Kea dynamic PD
This extends the prefix ID selection to be able to reserve a
range of IDs in order to automatically hand them out via Kea.

The accepted value is between 1 and the end of the PD ID range
and also validates against other IDs and their ranges.

This approach differs from the old ISC DHCPv6 in that we can
make room for delegation to avoid later surprises.  It might
force a user to reshuffle his ID range, but Kea wants a IA-NA
subnet that is within the pool reserved here.
2026-05-19 16:31:14 +02:00
Franco Fichtner
82a340e2be interfaces: fix two PHP warnings 2026-05-19 16:30:37 +02:00
Franco Fichtner
153818d94b kea: style sweep 2026-05-19 15:24:05 +02:00
Ad Schellevis
0bb5afb3ae Services: Monit: Status - sanitize monit output before offering it. 2026-05-19 11:41:07 +02:00
Konstantinos Spartalis
6207b5c83d
ui: apply button on multiple tab pages (#10331) 2026-05-19 11:29:30 +02:00
Monviech
0bd232447b
Services: Kea DHCPv6: Clean up allocator and pd-allocator terminology (#10330) 2026-05-19 10:31:14 +02:00
Stephan de Wit
db642a0cd8
ui: SimpleActionButton tab exclusion (#10328) 2026-05-19 10:29:40 +02:00
Marcos Della
6188aa8902
Services: Kea DHCP: Kea DHCPv4 - add subnet allocator field (#10327)
---------

Co-authored-by: Monviech <79600909+Monviech@users.noreply.github.com>
2026-05-19 10:27:12 +02:00
Monviech
f7c1d83398
Services: Kea DHCPv6: Always start the prefix watcher when DHCPv6 is enabled. A reservation with a prefix but without a configured pd_pool is also valid, it's more pragmatic to allow it than doing some complex validation gymnastics to prevent it. (#10329) 2026-05-19 09:58:23 +02:00