From 56c205f7070a541555c81bb8546d0a7ba4359e60 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 20 Jul 2010 17:01:11 -0700 Subject: Fix setting of actions on boot The redirect and mirror actions were incorrectly using an end: node, so they would fail on boot when combined with ifb. --- scripts/vyatta-qos.pl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/vyatta-qos.pl b/scripts/vyatta-qos.pl index b232ae2..9655371 100755 --- a/scripts/vyatta-qos.pl +++ b/scripts/vyatta-qos.pl @@ -303,6 +303,12 @@ sub apply_action{ unless($ingress); } +sub delete_action { + foreach my $dev (@_) { + system("sudo tc qdisc del dev $dev parent ffff: 2>/dev/null"); + } +} + sub usage { print < \@applyPolicy, "update-action=s" => \$updateAction, - + "delete-action=s" => \$deleteAction, ) or usage(); delete_interface(@deleteInterface) if ( @deleteInterface == 1); @@ -345,3 +352,4 @@ delete_policy(@deletePolicy) if ( @deletePolicy ); apply_policy(@applyPolicy) if ( @applyPolicy ); update_action($updateAction) if ( $updateAction ); +delete_action($deleteAction) if ( $deleteAction ); -- cgit v1.2.3