Ignore:
Timestamp:
2011-10-14T14:41:15+02:00 (5 years ago)
Author:
jow
Message:

[backfire/packages] merge r28454

Location:
branches/packages_10.03.1/net/wshaper
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/packages_10.03.1/net/wshaper/Makefile

    r16965 r28455  
    99 
    1010PKG_NAME:=wshaper 
    11 PKG_VERSION:=0.1 
     11PKG_VERSION:=0.2 
    1212 
    1313PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) 
     
    4545        $(INSTALL_BIN) ./files/wshaper.htb $(1)/usr/sbin/ 
    4646        $(INSTALL_BIN) ./files/wshaper.init $(1)/etc/init.d/wshaper 
     47        $(INSTALL_DATA) ./files/wshaper.config $(1)/etc/config/wshaper 
    4748endef 
    4849 
  • branches/packages_10.03.1/net/wshaper/files/wshaper.htb

    r10570 r28455  
    66# and uplink speed. In kilobits. Also set the device that is to be shaped. 
    77 
    8 MODULES='sch_ingress sch_sfq sch_htb cls_u32' 
    9 DOWNLINK=2000 
    10 UPLINK=240 
    11 DEV=eth0 
     8# All config needs to be done in /etc/config/wshaper 
     9 
     10. /etc/functions.sh 
     11config_load wshaper 
     12for s in downlink uplink network nopriohostdst nopriohostsrc noprioportdst noprioportsrc; do 
     13        config_get $s settings $s 
     14done 
     15 
     16device=$(uci_get_state network "$network" device) 
     17[ -z "$device" ] && logger -t wondershaper "Error: Could not find the device for network $network, aborting." && exit 1 
     18[ -z "$downlink" ] && logger -t wondershaper "Error: Downlink speed not set, aborting." && exit 1 
     19[ -z "$uplink" ] && logger -t wondershaper "Error: Uplink speed not set, aborting." && exit 1 
     20 
     21MODULES='sch_ingress sch_sfq sch_htb cls_u32 act_police' 
     22DOWNLINK="$downlink" 
     23UPLINK="$uplink" 
     24DEV="$device" 
    1225 
    1326# low priority OUTGOING traffic - you can leave this blank if you want 
    1427# low priority source netmasks 
    15 NOPRIOHOSTSRC= 
     28NOPRIOHOSTSRC="$nopriohostsrc" 
    1629 
    1730# low priority destination netmasks 
    18 NOPRIOHOSTDST= 
     31NOPRIOHOSTDST="$nopriohostdst" 
    1932 
    2033# low priority source ports 
    21 NOPRIOPORTSRC= 
     34NOPRIOPORTSRC="$noprioportsrc" 
    2235 
    2336# low priority destination ports 
    24 NOPRIOPORTDST="21" 
     37NOPRIOPORTDST="$noprioportdst" 
    2538 
    2639if [ "$1" = "status" ] 
     
    145158tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \ 
    146159   0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1 
     160 
     161logger -t wondershaper "Wondershaper was started on device $device." 
Note: See TracChangeset for help on using the changeset viewer.