summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-01-28 11:49:49 -0500
committerjim-p <jimp@pfsense.org>2013-01-28 11:49:49 -0500
commit8793cb1f83efaaf7e1d248239148a72869f537a8 (patch)
treed364ca03cce1cbc45419a3ce2c6888a07581400a /etc
parentf2ea45ef4717f489d40e93d392fa3355d22141a6 (diff)
downloadpfsense-8793cb1f83efaaf7e1d248239148a72869f537a8.zip
pfsense-8793cb1f83efaaf7e1d248239148a72869f537a8.tar.gz
is_subnet() will fail here if using comma-separated lists of networks. Use openvpn_validate_cidr() instead.
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