diff options
author | jim-p <jimp@pfsense.org> | 2013-02-25 15:24:49 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-02-25 15:24:49 -0500 |
commit | 6d0b9fe9398466de3ce448d08ccbe7bfda0c89ad (patch) | |
tree | 2f9f645612537e7c32b41f365a1c5178ee060b67 /etc/inc/openvpn.inc | |
parent | 6ca938cf1f4a0d2d65bc42c46da4470bb403b0a4 (diff) | |
download | pfsense-6d0b9fe9398466de3ce448d08ccbe7bfda0c89ad.zip pfsense-6d0b9fe9398466de3ce448d08ccbe7bfda0c89ad.tar.gz |
Better check for the right bits being set.
Diffstat (limited to 'etc/inc/openvpn.inc')
-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 d1cecf1..18267d5 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -1232,12 +1232,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}"); |