diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2011-08-02 14:22:03 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@vyatta.com> | 2011-08-02 14:22:03 -0700 |
commit | 05b8aa2ef80ee180d85c5025cf5e7d749853d805 (patch) | |
tree | 1ba1e882a87afe7e0e3f44a3b510b5dd39d6c955 | |
parent | 3a75269b92c234f6c0c011c49c5643699d221e80 (diff) | |
download | vyatta-cfg-qos-05b8aa2ef80ee180d85c5025cf5e7d749853d805.tar.gz vyatta-cfg-qos-05b8aa2ef80ee180d85c5025cf5e7d749853d805.zip |
Fix Qos start interface
The start-interface option was not correctly handling both in and out
directions. This is part of the problem with OpenVPN, and also shows
up when doing QoS on PPP.
-rwxr-xr-x | scripts/vyatta-qos.pl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/vyatta-qos.pl b/scripts/vyatta-qos.pl index 7c4a014..469c50f 100755 --- a/scripts/vyatta-qos.pl +++ b/scripts/vyatta-qos.pl @@ -137,11 +137,14 @@ sub start_interface { next unless $path; my $config = new Vyatta::Config; - $config->setLevel( $path ); - my $policy = $config->returnValue('traffic-policy'); + $config->setLevel($path . ' traffic-policy'); - update_interface( $ifname, $policy ) if ($policy); - update_action( $ifname ); + foreach my $direction ($config->listNodes()) { + my $policy = $config->returnValue($direction); + next unless $policy; + + update_interface( $ifname, $direction, $policy ); + } } } |