diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2014-03-13 16:05:14 +0100 |
---|---|---|
committer | PiBa-NL <pba_2k3@yahoo.com> | 2014-03-13 16:05:14 +0100 |
commit | 9ea8f935bcdce2e99462b04c65dc242755e2d88c (patch) | |
tree | 8658f4d0f3dbd949efcb8180888bb202318292bb /config/haproxy-devel/haproxy.inc | |
parent | 81a9356da1857aba8e7e03d956bfc092f699972a (diff) | |
download | pfsense-packages-9ea8f935bcdce2e99462b04c65dc242755e2d88c.tar.gz pfsense-packages-9ea8f935bcdce2e99462b04c65dc242755e2d88c.tar.bz2 pfsense-packages-9ea8f935bcdce2e99462b04c65dc242755e2d88c.zip |
haproxy-devel, handle carp master/backup plugin event for faster response when the haproxy process needs to be started
Diffstat (limited to 'config/haproxy-devel/haproxy.inc')
-rw-r--r-- | config/haproxy-devel/haproxy.inc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/config/haproxy-devel/haproxy.inc b/config/haproxy-devel/haproxy.inc index 9bc0dd80..c3ccc498 100644 --- a/config/haproxy-devel/haproxy.inc +++ b/config/haproxy-devel/haproxy.inc @@ -1131,6 +1131,17 @@ function load_ipfw_rules() { mwexec("/sbin/ipfw -x $ipfw_zone_haproxy -q {$g['tmp_path']}/ipfw_{$ipfw_zone_haproxy}.haproxy.rules", true); } +function haproxy_plugin_carp($pluginparams) { + // called by pfSense when a CARP interface changes its state (called multiple times when multiple interfaces change state) + // $pluginparams['type'] always 'carp' + // $pluginparams['event'] either 'rc.carpmaster' or 'rc.carpbackup' + // $pluginparams['interface'] contains the affected interface + $type = $pluginparams['type']; + $event = $pluginparams['event']; + $interface = $pluginparams['interface']; + haproxy_check_run(0); +} + function haproxy_check_run($reload) { global $config, $g, $haproxy_run_message; |