summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-03-07 15:35:34 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-03-07 15:35:34 -0800
commit5f18bd9d54986c80cd20dfb191f6c3dbad5c63d7 (patch)
tree74fc7cc248c7d8969f684761fadffcedcbcff7fa
parentfd9ffb944c35ea269bc1be337221dd0438b5f0be (diff)
downloadvyatta-cfg-qos-5f18bd9d54986c80cd20dfb191f6c3dbad5c63d7.tar.gz
vyatta-cfg-qos-5f18bd9d54986c80cd20dfb191f6c3dbad5c63d7.zip
clear old policy before applying new QOS
Need to cleanup old qdisc/class/filters before applying new one. Bugfix: 2932
-rwxr-xr-xscripts/vyatta-qos.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/vyatta-qos.pl b/scripts/vyatta-qos.pl
index 0f00646..63e2661 100755
--- a/scripts/vyatta-qos.pl
+++ b/scripts/vyatta-qos.pl
@@ -88,6 +88,9 @@ sub update_interface {
if ( $config->exists("$type $name") ) {
my $shaper = make_policy($config, $type, $name);
+ # Remove old policy
+ delete_interface($interface, $direction);
+
# When doing debugging just echo the commands
my $out;
if (defined $debug) {
@@ -163,10 +166,8 @@ sub update_policy {
$config->setLevel("interfaces ethernet");
foreach my $interface ( $config->listNodes() ) {
foreach my $direction ( $config->listNodes("$interface qos-policy") ) {
- if ($config->returnValue("$interface qos-policy $direction") eq $name) {
- delete_interface($interface, $direction);
+ if ($config->returnValue("$interface qos-policy $direction") eq $name)
update_interface($interface, $direction, $name);
- }
}
}
}