Revision 58f744b7
Added by Viktor Gurov almost 4 years ago
src/usr/local/www/vpn_openvpn_server.php | ||
---|---|---|
366 | 366 |
} |
367 | 367 |
} |
368 | 368 |
|
369 |
if ($result = openvpn_validate_cidr($pconfig['tunnel_network'], 'IPv4 Tunnel Network', false, "ipv4")) {
|
|
370 |
$input_errors[] = $result;
|
|
369 |
if (!empty($pconfig['tunnel_network']) && !is_subnetv4(trim($pconfig['tunnel_network']))) {
|
|
370 |
$input_errors[] = gettext("The field 'IPv4 Tunnel Network' must contain a valid IPv4 subnet with CIDR mask.");
|
|
371 | 371 |
} |
372 | 372 |
|
373 | 373 |
if (!empty($pconfig['tunnel_network']) && |
... | ... | |
377 | 377 |
$input_errors[] = gettext("The submitted IPv4 Tunnel Network is already in use."); |
378 | 378 |
} |
379 | 379 |
|
380 |
if ($result = openvpn_validate_cidr($pconfig['tunnel_networkv6'], 'IPv6 Tunnel Network', false, "ipv6")) {
|
|
381 |
$input_errors[] = $result;
|
|
380 |
if (!empty($pconfig['tunnel_networkv6']) && !is_subnetv6(trim($pconfig['tunnel_networkv6']))) {
|
|
381 |
$input_errors[] = gettext("The field 'IPv6 Tunnel Network' must contain a valid IPv6 prefix.");
|
|
382 | 382 |
} |
383 | 383 |
|
384 | 384 |
if (!empty($pconfig['tunnel_networkv6']) && |
Also available in: Unified diff
OpenVPN Tunnel network input validation fix. Issue #11999