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 feba7cfad4878b00bf09e90d850e95cdfde035e3..91b006b271033788fdfc60c3723dcb203829fbe1 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 5e337df5fd7ffbc07b921e3ff2f4b7aa7d6f8b6b..f2cc7391b3aba09299cab330165d64e8e7efa014 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 2aee8224a6c8bb2e8fec21ef937c8a63cc442416..e4284839c6dbff9c7b018022373113fdbae26fcd 100644 (file)
@@ -1,4 +1,5 @@
 config upnpd config
+       option secure_mode      1
        option log_output       0
        option download         1024
        option upload           512