summaryrefslogtreecommitdiffstats
path: root/etc/rc.openvpn
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@world.inf.org>2013-09-29 05:42:46 -0700
committerPhil Davis <phil.davis@world.inf.org>2013-09-29 05:42:46 -0700
commit78b2a705de9fe698709356e25505d0cabf839ffe (patch)
tree12695365ce35686dfbbf5cf1746c71cdaab1a926 /etc/rc.openvpn
parent8ad84ebb49f86e791427110233382bd5e804d503 (diff)
downloadpfsense-78b2a705de9fe698709356e25505d0cabf839ffe.zip
pfsense-78b2a705de9fe698709356e25505d0cabf839ffe.tar.gz
Fix logic inn detecting if OpenVPN resync needed
Commit https://github.com/pfsense/pfsense/commit/f33dcc5c79c54af7daf91a81cfdd7f489e8cb67c reversed the logic sequence when testing if $resync_needed - the individual tests were changed from "==" to "!=" and so on, but the conjunction also need to be changed - "or" needs to be "and". I had noticed that VPNs on some gateway groups of mine didn't failover recently, but hadn't gone looking for the problem until now. This might help bug #3243 - it will probably now make the OpenVPN resync on every interface/gateway change for the cases of CARP VIPs and VLANs mentioned in that bug report. At least that will be better than not resyncing at all.
Diffstat (limited to 'etc/rc.openvpn')
-rwxr-xr-xetc/rc.openvpn2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/rc.openvpn b/etc/rc.openvpn
index f60ad56..857dee2 100755
--- a/etc/rc.openvpn
+++ b/etc/rc.openvpn
@@ -51,7 +51,7 @@ function openvpn_resync_if_needed ($mode, $ovpn_settings, $interface) {
$new_device = get_failover_interface($ovpn_settings['interface']);
if (isset($config['interfaces'][$interface])) {
$this_device = $config['interfaces'][$interface]['if'];
- if (($current_device == $new_device) || ($current_device != $this_device) || ($new_device != $this_device))
+ if (($current_device == $new_device) && ($current_device != $this_device) && ($new_device != $this_device))
$resync_needed = false;
}
}
OpenPOWER on IntegriCloud