15082 Commits

Author SHA1 Message Date
Stephan de Wit
5492d4477c
Unbound: migrate General page to MVC (#6418) 2023-03-15 13:00:22 +01:00
Franco Fichtner
03ac997fa4 system: migrate services page to MVC #6376
Widget is next.  While here set configd to 'locked'.
2023-03-15 12:29:07 +01:00
Franco Fichtner
3111b79d99 web proxy: cleanup 2023-03-15 10:06:57 +01:00
Franco Fichtner
4d2c1c2217 system: simplify dump, likely won't need plain boolean status #6376
It's easier to use but the MVC already runs on parsing for
"is running" so we don't have to change the world here and
introduce new things.
2023-03-15 09:24:05 +01:00
Franco Fichtner
2511790cb8 ipsec: same for strongswan status 2023-03-15 09:18:09 +01:00
Franco Fichtner
7b9b1a69ff unbound: replace with portable call
The MVC mutable controller looks for "is running" which is
always given if enabled and running.  If not enabled the control
will not show and if not running it will say so.
2023-03-15 09:14:39 +01:00
Franco Fichtner
179c6e4f37 system: fix service control bugs, dedup and oddities plus new #6376
service_name() and service_message() make this more usable.  Also
add a status command for -s mode that emulates rc system output.
2023-03-15 09:06:43 +01:00
Franco Fichtner
0fc88f2d3d system: yup yup #6376
Most likely this is backend material which needs to be filtered/
used to render page content and react on via formalized API request
in order to avoid leaking data.

The nice thing about the filtering is that we only ever have to look
up service status for matching services making the lookup faster.
2023-03-14 16:09:11 +01:00
Franco Fichtner
c56bb65762 system: small service list dump via pluginctl for #6376
We may have to fill out runtime information as well and filter
correctly just in case the API ever requires it as it's not a
lot of work.
2023-03-14 15:45:49 +01:00
Franco Fichtner
fa955f66bc network time: migrate to PID file 2023-03-14 12:16:33 +01:00
Franco Fichtner
b60d7769b4 scripts: last bits of killbypid() converted 2023-03-14 10:45:13 +01:00
Franco Fichtner
6b719e9411 system: killbypid() in web GUI 2023-03-14 10:36:12 +01:00
Franco Fichtner
9316f4fbbd system: killbypid() in RRD 2023-03-14 10:35:16 +01:00
Franco Fichtner
4a2fb77576 openvpn: simplify killbypid() 2023-03-14 10:28:42 +01:00
Franco Fichtner
9be3015c75 unbound: my favourite way to reduce future diffs is a trailing comma 2023-03-14 10:28:16 +01:00
Stephan de Wit
fff42a1264 Unbound: replace service hooks with configuration hooks
With the intent of migrating the general settings page to MVC, the service framework in its current state would be responsible for starting/stopping unbound. However, once the configuration states it isn't enabled the start/stop methods are not exposed anymore.
2023-03-14 10:24:28 +01:00
Franco Fichtner
393690bdb0 system: killbypid() in gateway monitors 2023-03-14 10:23:32 +01:00
Franco Fichtner
1af5c3b770 firewall: killbypid() simplification 2023-03-14 10:22:20 +01:00
Franco Fichtner
481db99fa5 dnsmasq: style and killbypid() simplification 2023-03-14 10:21:28 +01:00
Franco Fichtner
d60bf5ff9e make: stray newline 2023-03-14 09:31:16 +01:00
Franco Fichtner
e2b7cdae45 unbound: improve restart experience by waiting for pid to be ready
OpenVPN uses a similar trick already.
2023-03-14 09:28:03 +01:00
Franco Fichtner
a59f8666a2 interfaces: fix an issue with a batch killbyname()
For 23.7 killbyname() should be removed.  PID files are here to stay.
2023-03-14 08:12:22 +01:00
Franco Fichtner
4292bd3500 system: default to wait for pid during signaling
Except when HUP is used, which would wait forever.
2023-03-14 08:05:32 +01:00
Ad Schellevis
d1f981b6c3 Interfaces: Diagnostics: Packet Capture - minor cleanup 2023-03-13 21:41:25 +01:00
Ad Schellevis
651edfe7c4 Interfaces: Diagnostics: Packet Capture - make sure output buffering is disabled and add headers for the download. closes https://github.com/opnsense/core/issues/6321 2023-03-11 21:40:44 +01:00
Ad Schellevis
3725d70732 Firewall: Rules - missing [!] on inverted aliases. 2023-03-10 07:48:22 +01:00
Franco Fichtner
9b41ff8aff pkg: fix plist 2023-03-09 18:10:01 +01:00
Ad Schellevis
febec04e28 Reporting/Health - simplify state collection for system-states.rrd which should increase performance and fixes the nat count 2023-03-09 17:35:58 +01:00
Ad Schellevis
8f9534c768 VPN: IPsec: Advanced Settings, make sure that hitting save on the settings store the proper values. https://docs.strongswan.org/docs/5.9/config/logging.html seems to suggest the default log level is 1 (Generic control flow), which should be our default as well then. 0 wasn't stored properly, 3f39ff8442 did fix the select but not the storing part (as 0 isn't the default we should store explicit) 2023-03-09 16:29:57 +01:00
Franco Fichtner
4b03f1c88d interfaces: lock gateway save button while the request is being processed #6406 2023-03-09 12:55:35 +01:00
Franco Fichtner
351e0a1c61 mvc: typo 2023-03-09 11:06:57 +01:00
Franco Fichtner
477f6e85a6 firmware: small typo 2023-03-09 11:05:28 +01:00
Franco Fichtner
74fe31682f mvc: fix PHP warnings and dance around null/0.0.0 ambiguity
If we have a model and no data we assume and write 0.0.0, but if we
have a legacy data we want to have null to designate that we do
actually migrate although from the top point of view 0.0.0 are the
same.
2023-03-09 10:59:44 +01:00
Franco Fichtner
84f0bcdbdb firmware: actually extract the subscription from the mirror #4881
We do not use it very often and almost all mandatory reads are done
via opnsense-update which figures this out differently.
2023-03-09 10:55:40 +01:00
Franco Fichtner
ac0f58f291 firmware: unify a bit more to make inherited getAction() usable; closes #4881
Adjust setAction() to deal with the same input.  I think that is enough for
the scope of the ticket.  The focus was to be able to add more precise
validations/extensions of the model, which is now prepared.

On the plus side the GUI still works.  ;)
2023-03-08 21:54:17 +01:00
Franco Fichtner
fc8fb4e289 firmware: unify this while at it #4881 2023-03-08 21:48:12 +01:00
Franco Fichtner
68e5272cf1 src: style sweep 2023-03-08 21:43:36 +01:00
Franco Fichtner
e79a8a1af0 firmware: extract subscription during migration #4881
We need it to better distinguish data during model validation
against repository definitions.
2023-03-08 21:39:53 +01:00
Franco Fichtner
4c65524322 firmware: use model for more generic set and validation #4881
We do have to jump through a few hoops to make this work.  First and
foremost during validation the model should have a "cleansed" view
of its data which means we add the subscription as a separate field
and append it to the mirror after validation.

It might be good to straighten this out later, also in the get path
so that we can hide all required translation in the controller until
we can move this to a standard GUI component and straighten out the
mirror read on the other end when subscriptions are required (but
currently no appended).
2023-03-08 17:03:58 +01:00
Ad Schellevis
08ac6a21b7 Interfaces: Virtual IPs: Status - typo "Persistent maintance mode" ... => maintenance 2023-03-08 14:31:35 +01:00
Franco Fichtner
13b70a69c7 firmware: use model to save data #4881 2023-03-08 13:13:41 +01:00
Franco Fichtner
e18d337419 firmware: use model to get config data #4881 2023-03-08 12:51:02 +01:00
Ad Schellevis
48bdf53cda Firewall: Rules - refactor soure/destination (port) rendereing and align it with manual rules underneath, while here also hide group items when in a group. closes https://github.com/opnsense/core/issues/6403 2023-03-08 11:53:16 +01:00
Franco Fichtner
9187fe78bf firmware: migrate old flavour entries #4881
While here tweak the GUI a little.
2023-03-08 10:21:10 +01:00
Stephan de Wit
8739747ddd Unbound: advanced: add infra-keep-probing option
https://forum.opnsense.org/index.php?topic=32852.0
2023-03-08 09:39:19 +01:00
Franco Fichtner
cc01887328 system: style 2023-03-08 09:24:59 +01:00
Ad Schellevis
3af487bcf6 VPN: IPsec: Tunnel Settings - "Allow any remote gateway to connect" should suffix all in order to connect to the other end. closes https://github.com/opnsense/core/issues/6396 2023-03-07 19:55:03 +01:00
Franco Fichtner
dc9e22331e system: expannd to array if not an array
Allows command line use:

    # pluginctl route_reload [wan]
2023-03-07 12:24:21 +01:00
Franco Fichtner
4359fcbf11 ipsec: add a routing hook and use it for all ipsec devices #6354 2023-03-07 12:12:10 +01:00
Franco Fichtner
2fc2563aae ipsec: remove this, never used 2023-03-07 11:41:50 +01:00