Added new bandwidth limit option to tunneldigger.

This commit is contained in:
Jernej Kos 2013-06-06 18:56:29 +02:00
parent 8e423b5efd
commit 3161df6e34
3 changed files with 8 additions and 3 deletions

View File

@ -1,8 +1,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=tunneldigger
PKG_VERSION:=0.2
PKG_RELEASE:=2
PKG_VERSION:=0.3
PKG_RELEASE:=1
PKG_REV:=HEAD
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2

View File

@ -4,4 +4,4 @@ config broker
list address 'x.y.z.w:123'
option uuid 'abcd'
option interface 'l2tp0'
option limit_bw_down '1024'

View File

@ -12,11 +12,16 @@ config_cb() {
config_get addresses "$cfg" address
config_get uuid "$cfg" uuid
config_get interface "$cfg" interface
config_get limit_bw_down "$cfg" limit_bw_down
local broker_opts=""
for address in $addresses; do
broker_opts="${broker_opts} -b ${address}"
done
if [ ! -z "${limit_bw_down}" ]; then
broker_opts="${broker_opts} -L ${limit_bw_down}"
fi
/usr/bin/tunneldigger -u ${uuid} -i ${interface} -t ${tunnel_id} ${broker_opts} &
let tunnel_id++