summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/openvpn.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index ae9ca0d..9da8f4f 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -663,11 +663,11 @@ function openvpn_reconfigure($mode, $settings) {
}
// Add a remote network route if set, and only for p2p modes.
- if ((substr($settings['mode'], 0, 3) == "p2p") && is_subnet($settings['remote_network'])) {
+ if ((substr($settings['mode'], 0, 3) == "p2p") && openvpn_validate_cidr($settings['remote_network'], "", true, "ipv4")) {
$conf .= openvpn_gen_routes($settings['remote_network'], "ipv4", false);
}
// Add a remote network route if set, and only for p2p modes.
- if ((substr($settings['mode'], 0, 3) == "p2p") && is_subnet($settings['remote_networkv6'])) {
+ if ((substr($settings['mode'], 0, 3) == "p2p") && openvpn_validate_cidr($settings['remote_networkv6'], "", true, "ipv6")) {
$conf .= openvpn_gen_routes($settings['remote_networkv6'], "ipv6", false);
}
OpenPOWER on IntegriCloud