summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2015-03-24 14:08:53 -0400
committerjim-p <jimp@pfsense.org>2015-03-24 14:08:53 -0400
commitd4d24d6a085462e2d863c0218252c21f603db524 (patch)
tree6235d33ab524053c253b45f5caccc1c71ea148f7 /etc
parente0f5f6f48713ee4278bf884bae62438fd6d4483e (diff)
downloadpfsense-d4d24d6a085462e2d863c0218252c21f603db524.zip
pfsense-d4d24d6a085462e2d863c0218252c21f603db524.tar.gz
The logic of this test seems to be incorrect.
If the interface is the same, this test will fail, and that's the one case that should not need a resync. The logic in this test has been flipped and reversed a few times over the years and without comments it's difficult to discern its true purpose.
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.openvpn3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/rc.openvpn b/etc/rc.openvpn
index 303f91c..9e0d18a 100755
--- a/etc/rc.openvpn
+++ b/etc/rc.openvpn
@@ -54,7 +54,8 @@ 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))
+ /* If the "current", "new", and "this" device are ALL the same, no resync should be necessary */
+ if (($current_device == $new_device) && ($current_device == $this_device))
$resync_needed = false;
}
}
OpenPOWER on IntegriCloud