diff options
author | jim-p <jimp@pfsense.org> | 2013-07-05 11:46:54 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-07-05 11:48:07 -0400 |
commit | 9db8c46dff30587e7505f84783f14fa915951b4a (patch) | |
tree | 2b1be81e14a92f37acab7131070f6f2ab839ef59 | |
parent | 0ee96a458ab93ff451c9bb32b1b8bc20e13866e6 (diff) | |
download | pfsense-9db8c46dff30587e7505f84783f14fa915951b4a.zip pfsense-9db8c46dff30587e7505f84783f14fa915951b4a.tar.gz |
When a CARP VIP transitions to master, we need to bump servers also, otherwise a transition from disabled or init may not properly (re)attach to the IP address.
-rwxr-xr-x | etc/rc.carpmaster | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/rc.carpmaster b/etc/rc.carpmaster index f57d150..50db028 100755 --- a/etc/rc.carpmaster +++ b/etc/rc.carpmaster @@ -50,5 +50,13 @@ if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-client' } } } +if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-server'])) { + foreach ($config['openvpn']['openvpn-server'] as $settings) { + if ($settings['interface'] == $argv[1]) { + log_error("Starting OpenVPN instance on {$settings['interface']} because of transition to CARP master."); + openvpn_restart('server', $settings); + } + } +} ?>
\ No newline at end of file |