mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
Gateways: Single: Migrate to MVC - rework datastorage layer. regression in ebc8e34b15
This commit is contained in:
parent
b739cd605e
commit
4333c81e65
@ -58,11 +58,11 @@ class Gateways extends BaseModel
|
||||
$this->validateNameChange($gateway, $messages, $ref);
|
||||
$this->validateDynamicMatch($gateway, $messages, $ref);
|
||||
foreach (['gateway', 'monitor'] as $key) {
|
||||
if (empty((string)$node->$key) || (string)$node->$key == 'dynamic') {
|
||||
if (empty((string)$gateway->$key) || (string)$gateway->$key == 'dynamic') {
|
||||
continue;
|
||||
} elseif ((string)$node->ipprotocol === 'inet' && !Util::isIpv4Address((string)$node->$key)) {
|
||||
} elseif ((string)$gateway->ipprotocol === 'inet' && !Util::isIpv4Address((string)$gateway->$key)) {
|
||||
$messages->appendMessage(new Message(gettext('Invalid IPv4 address'), $ref . '.' . $tag));
|
||||
} elseif ((string)$node->ipprotocol === 'inet6' && !Util::isIpv6Address((string)$node->$key)) {
|
||||
} elseif ((string)$gateway->ipprotocol === 'inet6' && !Util::isIpv6Address((string)$gateway->$key)) {
|
||||
$messages->appendMessage(new Message(gettext('Invalid IPv6 address'), $ref . '.' . $tag));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user