diff options
author | jim-p <jimp@pfsense.org> | 2013-01-28 11:51:19 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-01-28 11:51:19 -0500 |
commit | 54285411022e29067d91597050e918426f130f7f (patch) | |
tree | c2a468a672c25fc4c20a8be9f593b1e408f35d83 /etc | |
parent | 8793cb1f83efaaf7e1d248239148a72869f537a8 (diff) | |
download | pfsense-54285411022e29067d91597050e918426f130f7f.zip pfsense-54285411022e29067d91597050e918426f130f7f.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.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index 9da8f4f..45a3ab4 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") && openvpn_validate_cidr($settings['remote_network'], "", true, "ipv4")) { + if ((substr($settings['mode'], 0, 3) == "p2p") && (openvpn_validate_cidr($settings['remote_network'], "", true, "ipv4") === FALSE)) { $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") && openvpn_validate_cidr($settings['remote_networkv6'], "", true, "ipv6")) { + if ((substr($settings['mode'], 0, 3) == "p2p") && (openvpn_validate_cidr($settings['remote_networkv6'], "", true, "ipv6") === FALSE)) { $conf .= openvpn_gen_routes($settings['remote_networkv6'], "ipv6", false); } |