Added new bandwidth limit option to tunneldigger.
This commit is contained in:
parent
4dd8ecf983
commit
f2ace405ff
@ -1,8 +1,8 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=tunneldigger
|
PKG_NAME:=tunneldigger
|
||||||
PKG_VERSION:=0.2
|
PKG_VERSION:=0.3
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
PKG_REV:=HEAD
|
PKG_REV:=HEAD
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
|
@ -4,4 +4,4 @@ config broker
|
|||||||
list address 'x.y.z.w:123'
|
list address 'x.y.z.w:123'
|
||||||
option uuid 'abcd'
|
option uuid 'abcd'
|
||||||
option interface 'l2tp0'
|
option interface 'l2tp0'
|
||||||
|
option limit_bw_down '1024'
|
||||||
|
@ -12,12 +12,17 @@ config_cb() {
|
|||||||
config_get addresses "$cfg" address
|
config_get addresses "$cfg" address
|
||||||
config_get uuid "$cfg" uuid
|
config_get uuid "$cfg" uuid
|
||||||
config_get interface "$cfg" interface
|
config_get interface "$cfg" interface
|
||||||
|
config_get limit_bw_down "$cfg" limit_bw_down
|
||||||
|
|
||||||
local broker_opts=""
|
local broker_opts=""
|
||||||
for address in $addresses; do
|
for address in $addresses; do
|
||||||
broker_opts="${broker_opts} -b ${address}"
|
broker_opts="${broker_opts} -b ${address}"
|
||||||
done
|
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} &
|
/usr/bin/tunneldigger -u ${uuid} -i ${interface} -t ${tunnel_id} ${broker_opts} &
|
||||||
let tunnel_id++
|
let tunnel_id++
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user