packages/net/miniupnpd: implement option for "secure" mode and enable it by default
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 25 Jan 2009 14:59:25 +0000 (14:59 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 25 Jan 2009 14:59:25 +0000 (14:59 +0000)
SVN-Revision: 14175

net/miniupnpd/Makefile
net/miniupnpd/files/miniupnpd.init
net/miniupnpd/files/upnpd.config

index feba7cf..91b006b 100644 (file)
@@ -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
index 5e337df..f2cc739 100644 (file)
@@ -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
index 2aee822..e428483 100644 (file)
@@ -1,4 +1,5 @@
 config upnpd config
+       option secure_mode      1
        option log_output       0
        option download         1024
        option upload           512