From 05b8aa2ef80ee180d85c5025cf5e7d749853d805 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 2 Aug 2011 14:22:03 -0700 Subject: 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. --- scripts/vyatta-qos.pl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'scripts') 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 ); + } } } -- cgit v1.2.3