[packages] miniupnpd: add option to enable NAT-PMP (#8747)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@25251 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
36f068af4a
commit
b838faf06b
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=miniupnpd
|
||||
PKG_VERSION:=1.5
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=5
|
||||
PKG_MD5SUM:=063f03a2a8363b9d4cb0f73b20b8dfce
|
||||
|
||||
PKG_SOURCE_URL:=http://miniupnp.free.fr/files
|
||||
|
@ -6,7 +6,7 @@ start() {
|
||||
ACTION=- . /etc/hotplug.d/firewall/50-miniupnpd
|
||||
|
||||
config_load "upnpd"
|
||||
local extiface intiface upload download logging secure enabled
|
||||
local extiface intiface upload download logging secure enabled natpmp
|
||||
|
||||
config_get extiface config external_iface
|
||||
config_get intiface config internal_iface
|
||||
@ -14,6 +14,7 @@ start() {
|
||||
config_get download config download
|
||||
config_get_bool logging config log_output 0
|
||||
config_get_bool secure config secure_mode 0
|
||||
config_get_bool natpmp config enable_natpmp 0
|
||||
config_get_bool enabled config enabled 0
|
||||
|
||||
include /lib/network
|
||||
@ -40,11 +41,8 @@ start() {
|
||||
[ "$secure" -gt 0 ] && \
|
||||
append args "-S"
|
||||
|
||||
if [ "$logging" = "1" ]; then
|
||||
[ "$enabled" -gt 0 ] && eval start-stop-daemon -S -x miniupnpd -- $args -d | logger -t miniupnpd &
|
||||
else
|
||||
[ "$enabled" -gt 0 ] && eval start-stop-daemon -S -x miniupnpd -- $args 2>/dev/null
|
||||
fi
|
||||
[ "$natpmp" -gt 0 ] && \
|
||||
append args "-N"
|
||||
|
||||
# start firewall
|
||||
local zone
|
||||
@ -52,6 +50,12 @@ start() {
|
||||
config_get zone core "${extiface:-wan}_zone"
|
||||
[ -n "$zone" ] && \
|
||||
miniupnpd_add_rules "$zone" "${extiface:-wan}" "$ifname"
|
||||
|
||||
if [ "$logging" = "1" ]; then
|
||||
[ "$enabled" -gt 0 ] && eval start-stop-daemon -S -x miniupnpd -- $args -d | logger -t miniupnpd &
|
||||
else
|
||||
[ "$enabled" -gt 0 ] && eval start-stop-daemon -S -x miniupnpd -- $args 2>/dev/null
|
||||
fi
|
||||
else
|
||||
logger -t "upnp daemon" "external interface not found, not starting"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user