Ad Schellevis
58b2efccd5
UIbootgrid usage - use generic bytes formatter in pf_top, ipsec and openvpn.
2023-09-04 20:49:15 +02:00
Ad Schellevis
a3d74d84a1
mvc / uibootgrid - add bytes format to standard formatters list.
2023-09-04 20:47:56 +02:00
Ad Schellevis
8a4f77bbd1
Core/Config - Use new File::file_put_contents() method to enforce access rights on backups and set initial access rights of the backup dir upon creation.
2023-09-04 20:34:52 +02:00
Ad Schellevis
8b7f6bab4e
Core - add File class incorporating a file_put_contents() alternative which handles access rights before writing the file. There may be some other file type utilities or patterns that are practical to reuse in which case we can add those here.
2023-09-04 20:32:28 +02:00
Ad Schellevis
54ebcb00c6
VPN: OpenVPN: Client Specific Overrides - add "route-gateway" advanced option which can be used to offer a different default gateway to the client when splitting the pool into smaller blocks. for https://github.com/opnsense/core/issues/6703
2023-09-04 11:45:37 +02:00
Manuel Faux
eafbf81b24
Fix IPsec key pair generator for secp256k1 EC and add properer naming to UI ( #6817 )
...
Key generation for the "256" EC does not work as secp256r1 does not
exist in OpenSSL, it's called secp256k1.
Also the names shown in the UI are ambiguous as there are several curves
with 256, 384 or 521 bits.
2023-09-02 16:43:12 +02:00
Manuel Faux
c48d8aa6c4
Fix misleading help text ( #6815 )
...
Confusing punctation would imply that the field is only relevant for certificate authentication.
2023-09-01 17:10:26 +02:00
Franco Fichtner
0ab708fb72
interfaces: avoid duplicating $vfaces array
...
The idea of list_interfaces.php was good so let's take it further
and inline the use into legacy_interfaces_details() and moving the
patterns to a shared function. Also add a device name hint in case
the array key is not passed for some reason which can help when
inspecting debug data. Since legacy_interfaces_details() is already
available in pluginctl -D replace the action command and drop the
obsolete script.
2023-09-01 09:45:31 +02:00
Franco Fichtner
001c382c51
mvc: one small change
...
Same goes for Required=N but since that is used 251 times it's
probably better to skip this.
2023-09-01 08:51:50 +02:00
Ad Schellevis
a702cf9fb3
VPN: IPsec: Connections - omit conditional authentication properties when not applicable. closes https://github.com/opnsense/core/issues/6807
2023-08-31 15:10:59 +02:00
Franco Fichtner
fc0f2c746d
mvc: update model <default/> to <Default/>
2023-08-31 12:54:20 +02:00
Franco Fichtner
69ac3ce299
make: work around destructive replacement pattern in style-model
...
Add a lint-model check for this so it's avoided in the future.
2023-08-31 12:49:34 +02:00
Franco Fichtner
377b298160
unbound: update model
2023-08-31 12:05:52 +02:00
Franco Fichtner
e3b28c06f9
mvc: more model consolidation
...
* s/multiple/Multiple/g (to fix lint mismatch)
* s/Default/default/g (to be fixed later, just too many now)
* BlankDesc default update and lint pass
* empty default lint pass
2023-08-31 11:59:42 +02:00
Franco Fichtner
6377f7856d
mvc: uppercase default label is more likely
2023-08-31 11:25:33 +02:00
Franco Fichtner
fa24ccce7d
openvpn: update model
2023-08-31 11:18:53 +02:00
Franco Fichtner
131bf0fda3
web proxy: update model
2023-08-31 11:15:03 +02:00
Franco Fichtner
45fc800acb
firewall: update models
2023-08-31 11:14:45 +02:00
Franco Fichtner
31ccea6b79
firewall: update traffic shaper model and kill old __empty__ trick
...
It was only used in one place and superseded by <BlankDesc/>.
2023-08-31 10:44:31 +02:00
Franco Fichtner
187aca0fbc
intrusion detection: update model and persist values for transparency
2023-08-31 10:33:05 +02:00
Franco Fichtner
1103923200
unbound: looks like 3edd472aaa0 tried to set a default value
2023-08-31 10:18:01 +02:00
Franco Fichtner
2d166a9a97
mvc: fix default issue with models and try to simplify (part 1 of a few)
2023-08-31 10:15:56 +02:00
Franco Fichtner
c6fbcf1e4d
mvc: remove "non-functional" hints as discussed
...
Hints/placeholders should not be misuses as help texts/documentation.
If an implicit default exists show it. Otherwise leave it empty.
2023-08-31 08:17:49 +02:00
Franco Fichtner
443dff5b53
unbound: optional fields should have no defaults
...
Use the placeholder (hint) as documentation and remove the help text
message which duplicates the same (plus the potential of being broken
in a translation).
2023-08-31 08:14:46 +02:00
Franco Fichtner
befa2aaceb
interfaces: remove dead link/hint in gif table; closes #6799
...
While here let loop iterate over existing key (it's the same).
2023-08-30 12:47:24 +02:00
Franco Fichtner
819689d195
interfaces: calculate_ipv6_delegation_length() should take advanced and custom dhcp6c into account #6790
2023-08-29 15:52:57 +02:00
Franco Fichtner
db8b0c5a18
interfaces: meh, we still need to define these otherwise we don't have them
2023-08-29 15:19:01 +02:00
Franco Fichtner
e2ada5baaf
interfaces: teach ifctl to dump all files and its data for an interface
2023-08-29 13:08:14 +02:00
Franco Fichtner
15c0788e50
src: remove spurious ifconfig data pass
2023-08-29 11:51:13 +02:00
Franco Fichtner
9fa2e59e1f
system: remove unused ifconfig property from Gateways class
...
Keep a shim with a default value in order to remove this gracefully
from the rest of the code since it was required before.
2023-08-29 11:50:36 +02:00
Franco Fichtner
c32c0a6591
mvc: style update
2023-08-29 10:30:02 +02:00
Franco Fichtner
7e37638825
interfaces: pppX device can also set MTU
2023-08-29 09:08:12 +02:00
Ad Schellevis
8f23d280c5
MVC/PortField - extend portfield to optionally allow port type aliases. requirement for https://github.com/opnsense/plugins/issues/3567
2023-08-29 08:57:15 +02:00
Franco Fichtner
7e85ad0921
openvpn: move tun-mtu/fragment/mssfix to instance (part 2)
2023-08-29 08:48:07 +02:00
Franco Fichtner
efd15f70c3
openvpn: move tun-mtu/fragment/mssfix to instances (part 1)
2023-08-29 08:16:53 +02:00
Franco Fichtner
2973d3b3f0
interfaces: small style update
2023-08-28 09:51:56 +02:00
Franco Fichtner
c8a5d32760
system: refactor far gateway handling out of default route handling
...
We need far gateway routes (interface routes) for each gateway not
directly attached to the network or else the monitoring for it fails
which prevents a default route from being added which would fix it.
Since system_default_route() is private nowadays allow to pass down
the gateway struct which simplifies/speeds up the process.
We also pull in "configctl -- interface routes list -n json" data when
doing a reconfiguration to check if the interface route needs to be
touched and we can also use this check for default route and perhaps even
static routes later on.
2023-08-28 09:18:58 +02:00
Ad Schellevis
78d49d85fe
VPN: OpenVPN: Instances - vpnid mixed up with server identifier in getInstanceById(), closes https://github.com/opnsense/core/issues/6784
2023-08-27 12:03:35 +02:00
Ad Schellevis
f56c6e2a0b
VPN: OpenVPN: Instances - add carp vhid tracking for clients. Offers the ability to track the carp status of a vhid to determine if a client should be active or not.
2023-08-25 22:28:29 +02:00
Franco Fichtner
c7f0f43515
interfaces: remove workaround for 24.1
...
Now we would rather want to fix the missing links correctly than
to drag this out. The biggest issue here is that we starts everything
with detached mode wich means IPv4 and IPv6 will both try to set default
routes while this will also try to set default routes which is not good.
Noticed this while testing interface routes rework as the log messages
were overlapping from different scripts doing the same.
e5006e9e4 was already fixing the routing for STF so I guess GIF and
GRE are next... Looking at rc.newwanip bridges probably have the same
issue.
2023-08-25 22:01:23 +02:00
Ad Schellevis
27e723a00e
VPN: OpenVPN: Instances - add advanced option for optional CA selection. closes https://github.com/opnsense/core/issues/6771
2023-08-25 20:07:35 +02:00
Ad Schellevis
d3af50ad90
VPN: OpenVPN: Client Specific Overrides - fix mismatch issue when pinning a CSO to a specific instance. As new CSO's are stored by uuid, we should make sure to send events using them as well. cc @fichtner
2023-08-25 16:53:56 +02:00
Franco Fichtner
ea92afafc5
system: move development languages to development flag instead
...
This avoids carrying a diff between master and respective stable.
2023-08-25 15:09:13 +02:00
Franco Fichtner
cf4f47d91f
system: update translations
2023-08-25 11:31:49 +02:00
Stephan de Wit
fb2d2f63d1
dhcpd6: fix iaid_duid parsing
...
It seems it's possible for whitespace to exist between the double quotes
and iaid_duid identifier. We also make sure that we're correctly
able to identify the ending bracket of a single iaaddr or iaprefix
segment.
2023-08-25 08:53:46 +02:00
Ad Schellevis
1dbcf112e6
Firewall: Rules - fix group priority handling introduced in 8e197ff73e , closes https://github.com/opnsense/core/issues/6772
2023-08-24 19:47:04 +02:00
Ad Schellevis
318be6ab60
System: Configuration: Backups - fix missing config save when rrddata is supplied, closes https://github.com/opnsense/core/issues/6774
2023-08-24 19:25:11 +02:00
Franco Fichtner
587a50cb7c
system: don't hide the error that can no longer happen
2023-08-24 10:06:51 +02:00
Franco Fichtner
b94097567c
system: defer config reload to SIGHUP in gateway watcher
...
This should considerably lower CPU usage as reported a few times.
We do need to bring in pcntl PHP module in order to get that done
easily in the script.
PR: https://forum.opnsense.org/index.php?topic=35219.0
2023-08-24 10:00:54 +02:00
Stephan de Wit
6b90972371
dhcpd: map interfaces to interface names, not devices
2023-08-24 09:58:34 +02:00