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.
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)
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.
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.
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.
* 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
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.
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.
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.
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.
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
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.