From 22610d1769c6dabce2b4675085cab369f2d96331 Mon Sep 17 00:00:00 2001 From: Mike Larson Date: Fri, 29 Aug 2008 10:31:51 -0700 Subject: add rule failover support. Failover mode can now be specified on a specific rule. This rule will only direct traffic to a single active interface, on failure of the ping target traffice will be directed out an alternate interface. note: the one todo item for this feature is to add "stickiness" of an active interface. wlb re-evaluates all rules on an interface state change and this may cause the interface to change for failover mode. supporting this mode requires a less than trivial rewrite of the wlb decision code.: --- scripts/vyatta-wanloadbalance.pl | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts') diff --git a/scripts/vyatta-wanloadbalance.pl b/scripts/vyatta-wanloadbalance.pl index 9e273c5..49cb05b 100644 --- a/scripts/vyatta-wanloadbalance.pl +++ b/scripts/vyatta-wanloadbalance.pl @@ -96,6 +96,15 @@ sub write_rules { print FILE_LCK "\texclude\n"; } + if ($config->exists("$rule failover")) { + print FILE_LCK "\tfailover\n"; + } + + if ($config->exists("$rule failover") && $config->exists("$rule exclude")) { + print "failover cannot be configured with exclude\n"; + exit 1; + } + my $protocol = $config->returnValue("$rule protocol"); if (defined $protocol) { print FILE_LCK "\tprotocol " . $protocol . "\n" -- cgit v1.2.3