|
From: <abe...@us...> - 2012-12-26 21:33:59
|
Revision: 5838
http://astlinux.svn.sourceforge.net/astlinux/?rev=5838&view=rev
Author: abelbeck
Date: 2012-12-26 21:33:51 +0000 (Wed, 26 Dec 2012)
Log Message:
-----------
AIF traffic shaping, disable incoming shaping when 'Downlink Speed' (EXTDOWN) is set to 0
Modified Paths:
--------------
branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh
branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf
Modified: branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh
===================================================================
--- branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh 2012-12-26 17:38:44 UTC (rev 5837)
+++ branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh 2012-12-26 21:33:51 UTC (rev 5838)
@@ -187,6 +187,11 @@
incoming_traffic_limit()
{
+ # Skip if DOWNLINK is 0
+ if [ $DOWNLINK -eq 0 ]; then
+ return
+ fi
+
# Try to control the incoming traffic as well.
# Set up ingress qdisc
tc qdisc add dev $1 handle ffff: ingress
@@ -223,7 +228,7 @@
modprobe sch_hfsc
- printf "${INDENT}Shaping as %d/%d kb/s using '%s' for interface: %s\n" $DOWNLINK $UPLINK hfsc "$SHAPER_IF"
+ printf "${INDENT}Shaping as (Down/Up) %d/%d kb/s using '%s' for interface: %s\n" $DOWNLINK $UPLINK hfsc "$SHAPER_IF"
iptables -t mangle -N SHAPER_CHAIN
@@ -294,7 +299,7 @@
# Some required modules are already loaded by the main script:
modprobe ip_nat
- printf "${INDENT}Shaping as %d/%d kb/s using '%s' for interface: %s\n" $DOWNLINK $UPLINK htb "$SHAPER_IF"
+ printf "${INDENT}Shaping as (Down/Up) %d/%d kb/s using '%s' for interface: %s\n" $DOWNLINK $UPLINK htb "$SHAPER_IF"
iptables -t mangle -N SHAPER_CHAIN
Modified: branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf
===================================================================
--- branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2012-12-26 17:38:44 UTC (rev 5837)
+++ branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2012-12-26 21:33:51 UTC (rev 5838)
@@ -260,7 +260,9 @@
## Please change it after some testing, and make sure that it is %90 of your tested
## link speed. This prevents queing that destroys latency - very important for VOIP.
+## Disable incoming shaping by setting EXTDOWN=0, EXTUP must be greater than 0 if enabled.
## Disabled by default. Required if SHAPETYPE is set.
+## Units are in kbps
#EXTUP=300
#EXTDOWN=2000
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|