16031 Commits

Author SHA1 Message Date
Franco Fichtner
7f7bce2e54 src: style sweep 2023-11-10 07:38:00 +01:00
Ad Schellevis
b7945798c1 mvc - split treeview template and javascript and hook via controllers. frr uses roughly the same, eventually it would be practical to reuse the source. 2023-11-09 22:13:37 +01:00
Ad Schellevis
3a24156108 Firewall: Log Files: Live View - minor cleanup in log parsing, when no label is provided, make sure our structure does return an empty value 2023-11-09 18:21:32 +01:00
Stephan de Wit
fd2e872e0f ui: use attr() to set data values for selectpickers
This seems to be an issue with the bootstrap-select update and broke
selectpickers that contained badges in the option element.
2023-11-09 16:48:01 +01:00
Franco Fichtner
239ec1a382 interfaces: comma 2023-11-09 12:20:37 +01:00
Franco Fichtner
e37a473718 firewall: also patch this spot -.- 2023-11-09 12:17:46 +01:00
Stephan de Wit
af3c8669e6 interfaces: add wireguard to list of virtual interfaces 2023-11-09 11:12:10 +01:00
Franco Fichtner
fee20400f9 firewall: fix business bogons fetch
This may have been going on ever since we moved a separate CORE_ABI
in the business edition.  Fixed community mirror to accomodate for
23.4 and 23.10 for now as the bogons are the same anyway.

PR: https://forum.opnsense.org/index.php?topic=36886.0
2023-11-09 10:50:07 +01:00
Franco Fichtner
25620da2f8 system: fix warnings and SSH fail on empty <ssh/> node
PR: https://forum.opnsense.org/index.php?topic=36866.0
2023-11-09 09:08:56 +01:00
Franco Fichtner
a2d55c8939 firewall: port can be zero in automatic rule, render accordingly
PR: https://forum.opnsense.org/index.php?topic=36885.0
2023-11-09 09:06:50 +01:00
Franco Fichtner
72e2ea399e ui: source code maps broke chrome at some point in time
It probably no longer applies, but to not risk anything remove
it and think about removing the lint pass for it.
2023-11-09 07:42:33 +01:00
Franco Fichtner
7ee772a4c5 src: style sweep 2023-11-09 07:42:24 +01:00
Ad Schellevis
72170de8ad ui - upgrade jqTree to version 1.7.5 (https://mbraak.github.io/jqTree), which seems to be backwards compatible. 2023-11-08 21:48:51 +01:00
Ad Schellevis
0227baf6a3 System: Configuration: History - when omitting the backup filename (containing a timestamp), offer the latest one found based on filename. Since backup filenames contain a timestamp, array_reverse(glob()) should provide the latest first. closes https://github.com/opnsense/core/issues/6996
Endpoint without explicit filename for this host :  https://xxx.xxx.xxx.xxx/ui/core/backup/history/this
2023-11-08 21:23:20 +01:00
Franco Fichtner
89f8807515 interfaces: code style 2023-11-08 15:19:31 +01:00
Franco Fichtner
95f2f3173d dhcp: ordering was wrong... 2023-11-07 20:33:35 +01:00
Franco Fichtner
7dc17e2822 dhcp: match naming to Dnsmasq/Unbound handling
It might be good to change the other "DHCP" to "ISC DHCP"...
2023-11-07 20:15:56 +01:00
Ad Schellevis
08fa5350bc VPN: WireGuard - replace setconf with syncconf in service control for more fluent reloading. (https://github.com/opnsense/plugins/pull/3358) 2023-11-07 18:22:59 +01:00
Ad Schellevis
b25ea1c4b8 Kea / Dhcp - DHCPv4 replacement, missing service validation for https://github.com/opnsense/core/issues/6971 2023-11-07 16:13:40 +01:00
Franco Fichtner
b787a35c8e plugins: allow special selector for plugins_configure()
Since pluginctl tells us which plugins are hooking into the
configure facilities allow us to select the plugin directly
like so:

    # pluginctl vpn:wireguard

We use the delimiter ":" here as the configure already uses
it in the function end and it's unlikely used in a file name.
Both plugins_configure() and plugctl have no room to stuff
an optional argument somewhere, but the good thing is pluginctl
does not even need support for this and the PHP code could
use it too.

Make sure nobody gets the idea to do path traversal so strip
all "." and "/" characters.
2023-11-07 12:48:14 +01:00
Franco Fichtner
ab49e2054b firmware: don't mess with the model 2023-11-07 11:46:05 +01:00
Franco Fichtner
1b10075eb8 system: provide mismatching logic without reboot
Also push through the locking in this case to be able to audit.
2023-11-07 11:04:46 +01:00
Franco Fichtner
b249c6bf0d system: make this easier to read 2023-11-07 11:04:46 +01:00
Franco Fichtner
d12f43f0d4 system: consider set failure an import failure
Tell the user about the failed area selection and also mark deleted
sections as "restored".
2023-11-07 11:04:46 +01:00
Franco Fichtner
f0c7f0439c system: extend restore to be able to migrate 2023-11-07 11:04:46 +01:00
Franco Fichtner
303e5958a2 system: add SHA-512 password hash compliance switch; closes #6966
While here increase the cost of BCRYPT and align the auth_log()
function a bit to be used in auth.inc where it should have lived
in the first place.
2023-11-07 10:00:45 +01:00
Franco Fichtner
934fc4e37d src: style sweep 2023-11-06 21:24:31 +01:00
Ad Schellevis
8b9f3a1f29 model dialog padding (3), OPNsenseStdWaitDialog needs padding which d085f4ef36b6cd18e01df1557fb4dc8d3430c7b9 removed. 2023-11-06 21:16:37 +01:00
Ad Schellevis
eae7e36963 kea - add dependancy (https://github.com/opnsense/core/issues/6971) 2023-11-06 17:48:29 +01:00
Ad Schellevis
4333c81e65 Gateways: Single: Migrate to MVC - rework datastorage layer. regression in ebc8e34b15 2023-11-06 10:37:26 +01:00
Franco Fichtner
b739cd605e mvc: style sweep 2023-11-06 10:02:21 +01:00
Franco Fichtner
cb05c53e0b system: make trust store reload conditional
PR: https://forum.opnsense.org/index.php?topic=36824.0
2023-11-06 10:01:42 +01:00
Ad Schellevis
8e63fbb302 Kea / Dhcp - DHCPv4 replacement [https://github.com/opnsense/core/issues/6971], add "Auto collect option data" checkbox on the subnet.
Our current default (legacy) scenario is to use the configured interface addresss as gateway and primary dns, but since we don't want to complicate the templates and make the choice explicit, we're adding an option to auto-collect and persist on configuration save/apply.

This commit auto updates selected option data fields on request with the first matching address for the requested subnet found in ifconfig.
2023-11-05 19:26:48 +01:00
doktornotor
62bf0f5779
Remove localhost from automatically created Unbound ACL (#6986) (#6987)
Fixes https://github.com/opnsense/core/issues/6986
2023-11-05 14:58:44 +01:00
Ad Schellevis
ebc8e34b15 Gateways: Single: Migrate to MVC - rework datastorage layer.
This commit moves the default logic into the model so we can reflect current values into virtual fields.
For all relevant "dpinger" fields, we reflect the current value in a field named current_$field, which means we can always query the active value without touching the stored one. Determination of current is as easy as `!empty(model_value) ? model_value : default`.

Refactor the dpinger process to use the current_ fields, since "dpinger_status()" retrieves all instances including the ones not stored, safeguard the config properties to exclude status determination (as loss and latency fields don't exist).

Previously the validation messages seemed to miss some gettext(), re-add these as well and cleanup validation. By calling isFieldChanged() on the array type, we know the gateway object has changed, but not exactly which field, this might lead to some noise, but if we implement a fix for https://github.com/opnsense/core/issues/6978 , we should be able to avoid real issues with the bonus of needing less code.

The calculateCurrent() on the GatewayField ensures we can insert/update the current values after an update as these are nog aware of modifications automatically.

Finally, respect the 120 character screen limit.
2023-11-04 17:47:58 +01:00
Franco Fichtner
5ddb2292f2 firmware: lint 2023-11-03 14:16:11 +01:00
Franco Fichtner
6ef5a48772 firmware: add root file system to health audit
So we can see if UFS or ZFS is installed.

Loosely related to: https://forum.opnsense.org/index.php?topic=36745.0
2023-11-03 14:12:23 +01:00
Franco Fichtner
455e9d6e86 unbound: use tls-system-cert
According to the documentation that should work since 23.7.7.
2023-11-03 13:34:24 +01:00
Franco Fichtner
e547af2410 mvc: style sweep 2023-11-03 08:47:06 +01:00
Ad Schellevis
7be65661f7 System: Gateways: Configuration - Improve migration and fix minor validation issue causing the validation failing. (https://github.com/opnsense/core/pull/6808)
When there are invalid gateway items, it's likely better to skip the ones that we can not migrate in this case. Executing the validation on every record might be expensive, but likely leads to a more consistent end-result. After migration, make sure to remove the old cruft when we end up with at least one gateway.

Without "AllowDynamic" on the intreface selector, we will miss dynamic interfaces like ipsec vti's.
2023-11-02 21:26:12 +01:00
Stephan de Wit
c211858a08 MVC: config should be locked before calling checkAndThrowSafeDelete() 2023-11-02 13:57:31 +01:00
Stephan de Wit
46eb2c0194 Gateways: virtualize dpinger defaults during migration 2023-11-02 12:04:32 +01:00
Stephan de Wit
2fb2ae85fd Gateways: Single: Migrate to MVC - part 2: Do not persist dpinger defaults 2023-11-02 11:29:25 +01:00
Franco Fichtner
a55b4c8b22 firmware: invalidate caches earlier since certctl blocks this longer now 2023-11-02 09:39:20 +01:00
Franco Fichtner
4154cfcead src: style sweep 2023-11-02 09:37:03 +01:00
Stephan de Wit
f213bf2833
Gateways: Single: Migrate to MVC - part 2 (#6808)
Where the first stage primarily aims to keep the legacy handling of gateways intact, this stage does the conversion to MVC.

As part of the migration strategy, configured gateways will not be touched if the migration fails. This allows users to repair the gateways in the new situation.
2023-11-02 09:32:27 +01:00
Franco Fichtner
0a6dcfce03 service: style sweep 2023-11-02 07:30:10 +01:00
Franco Fichtner
a93d72629a firmware: c0urier.net mirror moved a while ago 2023-11-02 07:26:05 +01:00
Ad Schellevis
f90f16fc09 Kea / Dhcp - DHCPv4 replacement, initial minimal for https://github.com/opnsense/core/issues/6971
This commit contains the basic features of our new DHCPv4 server, it certainly needs additional testing as currently we only validated the configuration format is valid. The aim is to keep the json templates as simple as possible.

For now we keep the kea-control-agent disabled, we probably need it later, but we don't want to expose a listener without using it.
2023-11-01 21:24:34 +01:00
Franco Fichtner
fc5536732b firmware: record packages state for update reboot check for #6940
This way we can see if something changed and reboot if "always
reboot" is required.  We do the first hash unconditionally because
it's fast and maybe we can use this for other purposes as well.
2023-11-01 15:00:58 +01:00