mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
Services: Dnsmasq DNS & DHCP - fix validation for static ipv4, closes https://github.com/opnsense/core/issues/8568
This commit is contained in:
parent
5636079c16
commit
7beec43db9
@ -175,7 +175,16 @@ class Dnsmasq extends BaseModel
|
||||
);
|
||||
}
|
||||
|
||||
if (in_array('static', explode(',', $range->mode)) && $start_inet == 'inet6') {
|
||||
$is_static = in_array('static', explode(',', $range->mode));
|
||||
if (!$range->end_addr->isEmpty() && $is_static) {
|
||||
$messages->appendMessage(
|
||||
new Message(
|
||||
gettext("Static only accepts a starting address."),
|
||||
$key . ".end_addr"
|
||||
)
|
||||
);
|
||||
}
|
||||
if ($is_static && $start_inet == 'inet6') {
|
||||
$messages->appendMessage(
|
||||
new Message(
|
||||
gettext("Static is only available IPv4."),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user