mirror of
https://github.com/lucaspalomodevelop/opnsense-core.git
synced 2026-03-13 00:07:27 +00:00
openvpn: style sweep
This commit is contained in:
parent
2ef916de0c
commit
d820d74a45
@ -79,14 +79,15 @@ class OpenVPN extends BaseModel
|
||||
);
|
||||
}
|
||||
if (!empty((string)$instance->server) && strpos((string)$instance->server, '/') !== false) {
|
||||
if (explode('/', (string)$instance->server)[1] > 29 && !(
|
||||
if (
|
||||
explode('/', (string)$instance->server)[1] > 29 && !(
|
||||
(string)$instance->dev_type == 'tun' && (string)$instance->topology != 'subnet'
|
||||
)) {
|
||||
)
|
||||
) {
|
||||
/* tun + (net30 or p2p) are the exceptions here */
|
||||
$messages->appendMessage(
|
||||
new Message(gettext('Server directive must define a subnet of /29 or lower .'), $key . '.server')
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user