From e0de322e2abdbcde8ee6d46f54edb4702d2dae5b Mon Sep 17 00:00:00 2001 From: slioch Date: Tue, 16 Jun 2009 16:45:21 -0700 Subject: fix for bug 4578. Added warning message when the user configures inbound and outbound on same rule, but will allow configuration with warning. --- scripts/vyatta-wanloadbalance.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/vyatta-wanloadbalance.pl b/scripts/vyatta-wanloadbalance.pl index c0c4a8d..edc9232 100644 --- a/scripts/vyatta-wanloadbalance.pl +++ b/scripts/vyatta-wanloadbalance.pl @@ -192,9 +192,9 @@ sub write_rules { print FILE_LCK "\t}\n"; #inbound-interface - $option = $config->returnValue("$rule inbound-interface"); - if (defined $option) { - print FILE_LCK "\tinbound-interface " . $option . "\n" + my $inbound = $config->returnValue("$rule inbound-interface"); + if (defined $inbound) { + print FILE_LCK "\tinbound-interface " . $inbound . "\n" } else { print "inbound-interface must be specified\n"; @@ -206,6 +206,9 @@ sub write_rules { my @eths = $config->listNodes(); foreach my $ethNode (@eths) { + if ($inbound eq $ethNode) { + print "WARNING: inbound interface is the same as the outbound interface\n"; + } $valid = "true"; -- cgit v1.2.3