diff options
author | jim-p <jimp@pfsense.org> | 2015-03-24 14:08:53 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2015-03-24 14:08:53 -0400 |
commit | d4d24d6a085462e2d863c0218252c21f603db524 (patch) | |
tree | 6235d33ab524053c253b45f5caccc1c71ea148f7 | |
parent | e0f5f6f48713ee4278bf884bae62438fd6d4483e (diff) | |
download | pfsense-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.
-rwxr-xr-x | etc/rc.openvpn | 3 |
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; } } |