15808 Commits

Author SHA1 Message Date
Franco Fichtner
7fcbb22094 dhcp: merge_ipv6_address() was too intrusive
Testing 3582242d0fe10 it appeared that link-local addresses were
rewritten as GUAs in the dhcpd configuration.  The static map part
does this right, but all the other callers are not.  Flip this
around as it was intended.  The DHCPv6 page will now throw an out
of range error when it previously adjusted the explit prefix anyway.

dhcpd config with link local seems fine too, but more testing is
always good.
2023-09-22 14:22:56 +02:00
Alejandro Criado-Pérez
066d836afb
Multiple text corrections (#6867) 2023-09-22 13:46:11 +02:00
Franco Fichtner
11bbafed6e ipsec: improve new help texts 2023-09-22 13:38:30 +02:00
Daggolin
f53a60c911
openvpn: add up and down scripts to vpn instance configs (#6879) 2023-09-22 13:31:34 +02:00
Franco Fichtner
45c940fa26 mvc: style update 2023-09-22 13:27:59 +02:00
Franco Fichtner
a4b9e92769 mvc: IntegerField validation message update 2023-09-22 13:23:48 +02:00
Franco Fichtner
8d340ff5c8 mvc: NetworkField validation message update 2023-09-22 13:10:44 +02:00
Franco Fichtner
b3005955c1 mvc: HostnameField validation message 2023-09-22 13:08:13 +02:00
Franco Fichtner
7fab0249f7 mvc: EmailField validation msg 2023-09-22 13:05:54 +02:00
Franco Fichtner
90c5db7687 mvc: CSVListField validation message update
MaskPerItem=Y needs work and the preg_match() shoudldn't be used
to look inside the match which creates the initial problem:

/usr/local/opnsense/mvc/app/controllers/OPNsense/Base/ApiControllerBase.php:176:
Error at /usr/local/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/CSVListField.php:162 - Undefined array key 0 (errno=2)
2023-09-22 12:58:24 +02:00
Franco Fichtner
5d89666946 mvc: AutoNumberField validation message update 2023-09-22 12:37:58 +02:00
Franco Fichtner
cf80131910 mvc: BooleanField validation message and faulty regex fix 2023-09-22 12:32:09 +02:00
Franco Fichtner
3363fa9d2d mvc: Base64Field validation message update 2023-09-22 12:30:15 +02:00
Franco Fichtner
8aff5a9c81 mvc: NumericField validation message update 2023-09-22 12:17:41 +02:00
Franco Fichtner
2cd5fcac5c mvc: UnqiueIdField special validation message
If we ever derive from UnqiueIdField we would end up overwriting
this message and there is no data validation involved which the
message would be for so it can be null as per BaseField.
2023-09-22 11:29:32 +02:00
Franco Fichtner
8d8cc03ac3 mvc: UrlField validation message cleanup 2023-09-22 11:23:21 +02:00
Franco Fichtner
465f7fa8bb mvc: set Required=Y for GroupNameField
The validation message is never seen anymore and can't be overridden.
While the field made sure to emit a message on empty the result is
that if we ever have to use this group field as optional we would have
to pivot to this approach anyway.
2023-09-22 10:54:31 +02:00
Franco Fichtner
ac0fcaa406 mvc: remove special validation messages likely never seen
We could use defaultValidationMessage() but the BaseListField message
is fitting enough and the GUI itself cannot cause this to happen.
The reason for stripping is also that the variable is not handled by
the field so there is no special validation meaning attached either.

For BaseField derivates the idea was to set a custom required validation
message which is no longer possible or possibly not even reachable.
2023-09-22 10:54:09 +02:00
Franco Fichtner
9cb123ce7f interfaces: fix a PHP warning and make a comment about floating rules 2023-09-22 10:25:21 +02:00
Franco Fichtner
896ade7698 src: sweep 2023-09-22 10:21:42 +02:00
Franco Fichtner
7dcb31c024
mvc: improve field validation message handling (#6872)
* provide defaultValidationMessage() to inject gettext-supported string
* assume $internalValidationMessage can only be set by XML now
* the goal here is to translate and improve all the field validation messages
2023-09-22 10:17:18 +02:00
Stephan de Wit
d2eb2fcc91
UniqueConstraint: add test cases (#6875)
Since UniqueConstraint was worked on recently, some test cases to accomodate all scenarios
2023-09-22 10:12:21 +02:00
Franco Fichtner
ce189cb4ee interfaces: redirect after successful interface add
Otherwise reloading may repost the data which is unnecessary.
2023-09-22 09:54:06 +02:00
Franco Fichtner
c4682b5536 interfaces: improve UX and simplify bridge validation
To be honest the page was horrible.  Originally I wanted to reduce
the bridge validation code using interface_parent_devices() but
ended up renaming a lot of variables from "port" to "dev(ice)" and
started renaming the table headers for clarity which ended up in
splitting the add interface section from the list/modify section
which ended up restyling the whole table for better mobile use and
clear separation of functionality.  Also added a note to the add
section when no devices are available for assignment.

This should in theory prevent a number of support questions and
mistakes seen over the years WRT using this page.
2023-09-22 09:49:02 +02:00
Franco Fichtner
2d36853da4 interfaces: add interface return feature for use on bridges/assignment page 2023-09-22 09:49:00 +02:00
Franco Fichtner
e29a4e009d mvc: add isLinkLocal() for #6775 2023-09-21 15:12:47 +02:00
Daggolin
79355e3641
system: start gateway monitors after firewall rules are in place (#6874)
During bootup the gateway monitors were started before the firewall rules
were finished setting up. Under some circumstances this could lead to
incorrect data being reported by dpinger instances.
2023-09-21 14:38:23 +02:00
Franco Fichtner
bca764d307 mvc: style updates 2023-09-21 11:38:43 +02:00
Franco Fichtner
32f490b7e0 interfaces: VIP model style update 2023-09-21 10:42:53 +02:00
Franco Fichtner
e239ac2ab2 interfaces: fix loopholes in the VipNetworkField #6775 2023-09-21 10:38:44 +02:00
Franco Fichtner
bcd8cec574 mvc: emit correct message on required validation in BaseField
The base field would emit the validation message of the derived
field, but that is strange sometimes since the actual reason is
much more simple and less ambiguous.  Also makes it able to trace
the error to the model definition of Required=Y instead of routing
it through a different field that may have had no say in this.

Noticed on pools name input that throws "text validation error",
but was really complaining about the lack of a value.
2023-09-21 09:29:04 +02:00
Franco Fichtner
e5cbf948a1 ipsec: require pool name, otherwise empty is allowed (multiple times)
The required property gives clarity to the unique constraint
which allowe this only once before but now a number of times.

Also update the mask to make it more obvious.
2023-09-20 20:25:39 +02:00
Franco Fichtner
b2b26a18f4 ipsec: sweep 2023-09-20 14:25:53 +02:00
Monviech
d3ea1f5e90
VPN: IPsec: Connections: Pools add IP4_DNS and IP6_DNS Configuration Payloads (#6864) 2023-09-20 14:15:17 +02:00
Alejandro Criado-Pérez
e25ef6774b
Corrected some typos (#6778) 2023-09-20 13:44:39 +02:00
Franco Fichtner
2396e4b3ff interfaces: adjust wireless handling slightly for new return code 2023-09-20 09:29:49 +02:00
Franco Fichtner
9c1342dac9 interfaces: missing default returns (although the same) 2023-09-20 09:20:55 +02:00
Franco Fichtner
7e7c9094b4 mvc: add a title and small reference to internal service 2023-09-20 09:00:53 +02:00
Franco Fichtner
326311b554 unbound: couple of pages misses service-widget annotation on reconfigure 2023-09-20 09:00:26 +02:00
Franco Fichtner
c9b8f41ce8 backend: simplify previous to get rid of 'Execute error' 2023-09-19 20:33:43 +02:00
Franco Fichtner
35576deaaa system: simplify a string construct for translation efforts 2023-09-19 19:57:43 +02:00
Ad Schellevis
484753b2ab Lobby: Dashboard - fix data cleansing issue in column_count and sequences. 2023-09-19 19:46:28 +02:00
jkoch22
c39a226a48 Update firewall_scrub_edit.php
Correct typo and standardize "Normalization"
2023-09-19 19:15:17 +02:00
Franco Fichtner
7a8129a5d7 backend: template reload wildcard was returning "OK" on partial failures
This is better now, but there is still one inconsistency at play that
doesn't seem to matter much in the grand scheme of things.  Leaving this
here for @adschellevis to decide.

  # configctl template reload 'OPNsense/Unbound/*'
  ERR
  # configctl template reload 'OPNsense/Unbound/core'
  Execute error
  # configctl template reload 'OPNsense/Unbounddd'
  ERR
2023-09-19 16:01:12 +02:00
Franco Fichtner
6af3ec2954 mvc: throw on template reload issues in mutable service controller #6487
While this omits all other callers of "template reload" functionality
we would only like to be concerned with these GUI ones and migrate everything
to using a mutable controller (for maintenance reasons at the very last).

Only make a short hint to where the error is.  The service is not started
on purpose now.
2023-09-19 15:40:02 +02:00
Ad Schellevis
6393c5b577 Firewall: Aliases - fix cleanup issue when renaming an alias. the is_managed() statement should search for a parser and a hash file know if it was managed (and safe for removal). closes https://github.com/opnsense/core/pull/6845 2023-09-19 10:17:17 +02:00
Franco Fichtner
29d5a1b129 interfaces: style update 2023-09-19 08:06:56 +02:00
Franco Fichtner
c2fea3c9e3 system: extend pluginctl -4 to also return the interface name used for lookup 2023-09-19 08:06:56 +02:00
Franco Fichtner
1b066afd77 openvpn: model lint pass 2023-09-19 07:25:49 +02:00
Franco Fichtner
d86702262b dhcp: fix previous, restructure for clarity 2023-09-18 20:53:57 +02:00