packages/net/miniupnpd: implement option for "secure" mode and enable it by default
git-svn-id: svn://svn.openwrt.org/openwrt/packages@14175 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
a6d7f95d36
commit
16cc5381f9
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=miniupnpd
|
||||
PKG_VERSION:=1.1
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=5
|
||||
PKG_MD5SUM:=a0f6651476721db9b554668c8c83b151
|
||||
|
||||
PKG_SOURCE_URL:=http://miniupnp.free.fr/files
|
||||
|
@ -16,6 +16,7 @@ start() {
|
||||
local upload
|
||||
local download
|
||||
local logging
|
||||
local secure
|
||||
|
||||
config_load "upnpd"
|
||||
config_get extif config external_iface
|
||||
@ -23,6 +24,7 @@ start() {
|
||||
config_get upload config upload
|
||||
config_get download config download
|
||||
config_get_bool logging config log_output 0
|
||||
config_get_bool secure config secure_mode 0
|
||||
|
||||
config_load "network"
|
||||
config_get extiface ${extif:-wan} ifname
|
||||
@ -43,6 +45,9 @@ start() {
|
||||
[ -n "$upload" -a -n "$download" ] && \
|
||||
append args "-B $(($download * 1024 * 8)) $(($upload * 1024 * 8))"
|
||||
|
||||
[ "$secure" -gt 0 ] && \
|
||||
append args "-S"
|
||||
|
||||
if [ "$logging" = "1" ]; then
|
||||
eval start-stop-daemon -S -x miniupnpd -- $args -d | logger -t miniupnpd &
|
||||
else
|
||||
|
@ -1,4 +1,5 @@
|
||||
config upnpd config
|
||||
option secure_mode 1
|
||||
option log_output 0
|
||||
option download 1024
|
||||
option upload 512
|
||||
|
Loading…
x
Reference in New Issue
Block a user