summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-02-25 15:24:49 -0500
committerjim-p <jimp@pfsense.org>2013-02-25 15:25:30 -0500
commit822a8575e0a11bded4338675b96911945a763a26 (patch)
treeb21c70021763211bd193672c78e6af1962747dc3
parent9bfa57b39b9c800d9d9955df9f11bc1966da735c (diff)
downloadpfsense-822a8575e0a11bded4338675b96911945a763a26.zip
pfsense-822a8575e0a11bded4338675b96911945a763a26.tar.gz
Better check for the right bits being set.
-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 1894d64..973bf6f 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -1042,12 +1042,12 @@ function openvpn_clear_route($mode, $settings) {
break;
case 'p2p_tls':
case 'p2p_shared_key':
- if (!empty($ip) && !empty($mask) && ($cidr == 30))
+ if ($cidr == 30)
$clear_route = true;
break;
}
- if ($clear_route) {
+ if ($clear_route && !empty($ip) && !empty($mask)) {
list($ip1, $ip2) = openvpn_get_interface_ip($ip, $mask);
$ip_to_clear = ($mode == "server") ? $ip1 : $ip2;
mwexec("/sbin/route -q delete {$ip_to_clear}");
OpenPOWER on IntegriCloud