Commit graph

19620 commits

Author SHA1 Message Date
Ad Schellevis
40cb82128d mvc: BaseModel - improve legacy mapper support when parent item doesn't exist.
Fixes:

ErrorException: Undefined array key 0 in /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php:755
Stack trace:

If we can't find the specified root node, we should create one, which is similar to non legacy mapper nodes.
2026-02-03 16:28:06 +01:00
Monviech
5276f51dc0
dnsmasq: Compare lower case strings only in leases to fix edge cases in is_reserved detection (#9714) 2026-02-03 15:42:37 +01:00
Franco Fichtner
7ae42d9584 firmware: do not fail upgrade if new kernel is already booted
PR: https://forum.opnsense.org/index.php?topic=50654.0
2026-02-03 15:04:51 +01:00
Franco Fichtner
c3dd6d56f1 openssh: minor style tweak 2026-02-03 08:29:52 +01:00
Franco Fichtner
e771a800d5 ipsec: same same, switch class name not file name 2026-02-03 08:24:04 +01:00
Franco Fichtner
b95c81d08d interfaces: class name was wrong, fix UI page link 2026-02-03 08:18:31 +01:00
Franco Fichtner
e2d95ad672 firewall: double check the theory of 4c559a63d4
While here add the proper translation and safeguarding.
2026-02-03 07:59:05 +01:00
Franco Fichtner
45597a976c interfaces: fix wlan creation when $mode is empty
We don't currently have a way to specify if-empty-do-not-quote
since strict quoting is often much more effective in bubbling up
errors.  It could be useful to have it but the recent improvement
of mwexecf() and friends regarding array-based format strings can
account for this too.

PR: https://forum.opnsense.org/index.php?topic=50561.msg258926#msg258926
2026-02-02 21:17:15 +01:00
Ad Schellevis
39fcbddb05 mvc: ApiControllerBase->exportCsv(), mark content safe so escaping is disabled. closes https://github.com/opnsense/core/issues/9694 2026-02-02 21:11:36 +01:00
Monviech
ce432fa769
Firewall: Rules [new]: Remove schedule formatter from group and automatic rule rows (#9708) 2026-02-02 18:13:32 +01:00
Monviech
d260467553
Firewall: Rules [new]: Add link to states and put it first in list (#9707) 2026-02-02 17:16:40 +01:00
Monviech
0f6d82af34
Firewall: Rules [new]: Change toggle_log icon to help visibility of enabled/disabled status (#9704) 2026-02-02 16:14:33 +01:00
Monviech
9aaf675694
Firewall: Rules [new]: Statistics column is responsive now (#9679) 2026-02-02 11:14:39 +01:00
Stephan de Wit
7333fba07a bootgrid: cleanup previous 2026-02-02 11:02:01 +01:00
Stephan de Wit
3ce73ff043 bootgrid: searchable column selectors (fixes https://github.com/opnsense/core/issues/9698) 2026-02-02 11:00:14 +01:00
Stephan de Wit
b5cf3f7410 bootgrid: split toggle-selected into enable/disable-selected (https://github.com/opnsense/core/issues/9678) 2026-02-02 10:19:04 +01:00
Stephan de Wit
f7f0857ca9 bootgrid: introduce toggle-selected command (fixes https://github.com/opnsense/core/issues/9678)
This will only render if selection && multiSelect are true, and
stickySelect is disabled.
2026-02-02 09:23:02 +01:00
Franco Fichtner
4c559a63d4 firewall: ancient copy+paste error in scrub rules 2026-02-02 08:41:09 +01:00
Ad Schellevis
a5fed616a5 Firewall: Schedule - add missing schedules support in "Firewall: Rules [new]" and refactor existing usage to avoid duplication of logic. closes https://github.com/opnsense/core/issues/9690
This commit moves the schedule logic out of filter_core_rules_user() where it didn't belong in the first place.
Since we need legacy code to determine schedule behavior, we cannot move it to the plugin classes easily, instead sweep all registered rules after registration so we can process "sched" for all of them in the same way.

We can next add a simple action into the model to ask if there actually is a schedule, which pf_cron() needs to schedule the rule updates.

Finally add an icon and link into the mvc page to refer to the schedule itself.
2026-02-01 13:27:33 +01:00
Monviech
3bcdae70f7
radvd: When Base6Interface constructor is used, use its primary address for ifcfgipv6 (#9689) 2026-02-01 13:23:36 +01:00
Franco Fichtner
1727592311 firewall: style for previous 2026-02-01 12:15:04 +01:00
Ad Schellevis
c6540bf6fa Interfaces: Diagnostics: Ping - add optional interval (seconds), closes https://github.com/opnsense/core/issues/9695 2026-02-01 11:25:45 +01:00
Franco Fichtner
d31faf7f7c mvc: shield exec_safe() against "fatal" type errors
Allows the system to boot in the worst case and replaces the
command with a simple dummy command.

Formatters are still a work in progress as I'm not sure how
much preprocessing we should add here to fish for vsprintf()
doing type casts to int/float which is not something the command
line can/should support.
2026-02-01 11:11:29 +01:00
Franco Fichtner
70629923bb reporting: render as string instead for #9686
Revert ca06d54676.  A command line is a string and
don't offer exceptions to escaping.

We may consider replacing %[^s%] with %s in the format
string but there aren't many cases where it matters either.
Should just be part of the documentation we need to offer
soon.
2026-01-31 14:56:34 +01:00
Ad Schellevis
ca06d54676 backend: fix regression in 796a5c725b, when using %d or %f as formatters, we can't push them through escapeshellarg() as it will mangle the data unneeded. closes https://github.com/opnsense/core/issues/9686 2026-01-31 09:21:04 +01:00
Franco Fichtner
311184daa8 firewall: fix 2f60fcb062 removing anchor rendering
PR: https://forum.opnsense.org/index.php?topic=50520.0
2026-01-30 23:12:19 +01:00
Monviech
0f6cc03c69
Firewall: NAT: Destination NAT: The local-port field does not support range and well-known name (#9668)
* Make validation messages clearer
* Use selector in loop to determine where to replace the data (just the label is changed)
2026-01-30 14:53:54 +01:00
Franco Fichtner
c264c90504 interfaces: check dhcpdv6.enabled for -1 and add legacy config sections
PR: https://forum.opnsense.org/index.php?topic=50580.0
2026-01-30 12:43:48 +01:00
Monviech
ec20be4dd4
Firewall: Rules [new]: FilterBaseController requires Base\UserException (#9669) 2026-01-30 12:12:04 +01:00
Franco Fichtner
7a11458ea2 interfaces: fix migration for no-release option
This was introduced in d87ce014d9 storing the enabled value as "yes"
instead of true.  Threat it the same as the debug option.

PR: https://forum.opnsense.org/index.php?topic=50575.0 (and others)
2026-01-30 10:50:51 +01:00
Franco Fichtner
ffe3b40872 mvc: migration tweaks again for #9666 2026-01-30 10:07:29 +01:00
Franco Fichtner
5cc95f47a6 mvc: minor logging tweak for stdout 2026-01-30 10:00:13 +01:00
Franco Fichtner
be4900b112 pluginctl: use verbose migration mode #9666 2026-01-30 09:42:51 +01:00
Ad Schellevis
816fd574c9 mvc: support verbose logging in run_migrations.php, closes https://github.com/opnsense/core/issues/9666
This might be practical for some other system tools eventually too, since Syslog() is our own wrapper, we can echo output to stdout when requested. By making the callout static, each component can still have its own logger instance (and verbose log to stdout)

usage: /usr/local/opnsense/mvc/script/run_migrations.php -v
2026-01-30 09:28:25 +01:00
Franco Fichtner
9e70ee7508 mvc: use linter to find two wrong file names; closes #9638 2026-01-30 09:02:05 +01:00
Franco Fichtner
cff4c085d3 make: add a linter for PHP class name consistency #9638 2026-01-30 09:02:04 +01:00
Monviech
c827a02ef6
dhcp/kea: Use hostdiscovery service as ndp source in kea_prefix_watcher script (#9648)
* Use hostdiscovery service as ndp source in kea_prefix_watcher script via list_hosts.py, only request IPv6 addresses, fall back to ndp when hostdiscovery is not running
2026-01-30 08:36:16 +01:00
Monviech
5d571dcc89
Firewall: Rules [new]: normalize overload table between uuid and name (#9657)
* Firewall: Rules [new]: The mvc page stores the overload table as UUID, the legacy page as alias name. Turn UUID into alias name and vice versa during upload and download of rules, and then resolve it to a name before setting it in pf configuration.
* Firewall: Rules [new]: view, show translated value in the advanced field tooltip when possible, this will show the alias name instead of the UUID, fix upload bootgrid reload and hint the successful import with the change message
* Firewall: Rules [new]: There were error(s) loading the rules: /tmp/rules.debug:235: 'max-src-conn-rate' maximum rate must be < 4294967
2026-01-30 08:34:48 +01:00
Franco Fichtner
476ad93d6f firewall: fix typo with sprintf(); closes #9664 2026-01-29 21:19:39 +01:00
Ad Schellevis
1ddc63e402 Firewall: Aliases - set password input to autocomplete="new-password", closes https://github.com/opnsense/core/pull/9610
Similar as https://github.com/opnsense/core/pull/5311
2026-01-29 21:09:22 +01:00
Ad Schellevis
60695dd259 Firewall: Rules [new] - on import, validate uuid (either empty or valid), rework 34d7d77426 so other imports can use the same validation ( https://github.com/opnsense/core/issues/9661 ) 2026-01-29 21:09:22 +01:00
Matthias Kaduk
0642e17bc5
Bootgrid: allow multi word tooltips (#9656) 2026-01-29 11:47:53 +01:00
Franco Fichtner
87445129bf LICENSE: sync 2026-01-29 08:36:36 +01:00
Franco Fichtner
1ddc661a49 system: move to old location for better diff 2026-01-29 08:35:26 +01:00
Franco Fichtner
35575f9446 system: use known menu notation and annotate with "[]" for consistency 2026-01-29 08:32:11 +01:00
Franco Fichtner
43de1e0e42 interfaces: generalise the dhcp6c_script using the new IFNAME variable #7647
Now that the new dhcp6c code is in 26.1 we can start using it.

The file was conceptually created inline via d36f0f4f62 and before was
a single command line script... so add appropriate copyrights from that
time onward.

Many thanks to Martin for pinoeering this back in the day!
2026-01-28 22:27:07 +01:00
Franco Fichtner
1e1a6a37f6 make: pretty up previous, use tools.git wording 2026-01-28 22:27:07 +01:00
Franco Fichtner
8c1a820340 mvc: style 2026-01-28 22:15:39 +01:00
Ad Schellevis
34d7d77426 Firewall: Rules [new] - on import, validate uuid (either empty or valid), closes https://github.com/opnsense/core/issues/9661 2026-01-28 21:22:47 +01:00
Ad Schellevis
f8560f063f mvc: support throwing exceptions in importRecordSet(.., $data_callback, ..) for importCsv() to add validation on the input data.
requirement for: https://github.com/opnsense/core/issues/9661
2026-01-28 21:14:02 +01:00