diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-03-07 15:35:34 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-03-07 15:35:34 -0800 |
commit | 5f18bd9d54986c80cd20dfb191f6c3dbad5c63d7 (patch) | |
tree | 74fc7cc248c7d8969f684761fadffcedcbcff7fa /scripts | |
parent | fd9ffb944c35ea269bc1be337221dd0438b5f0be (diff) | |
download | vyatta-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
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-qos.pl | 7 |
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); - } } } } |