summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMike Larson <mike@suva.vyatta.com>2008-08-29 10:31:51 -0700
committerMike Larson <mike@suva.vyatta.com>2008-08-29 10:31:51 -0700
commit22610d1769c6dabce2b4675085cab369f2d96331 (patch)
treeb71ab147c70404a6f043a5b60f5a8a32ffb00d05 /scripts
parentbee9cfb28e0578a564628d61862764b3cdb2b377 (diff)
downloadvyatta-wanloadbalance-22610d1769c6dabce2b4675085cab369f2d96331.tar.gz
vyatta-wanloadbalance-22610d1769c6dabce2b4675085cab369f2d96331.zip
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.:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/vyatta-wanloadbalance.pl9
1 files changed, 9 insertions, 0 deletions
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"