Permalink
Browse files

miniupnpd: update to mainline version

  • Loading branch information...
Dave Taht
Dave Taht committed Sep 24, 2012
1 parent 49a0b57 commit 97815a0fb025592393adb9516dd8e9f6b30b36b4
Showing with 14 additions and 31 deletions.
  1. +3 −3 net/miniupnpd/Makefile
  2. +4 −4 net/miniupnpd/files/miniupnpd.iface.hotplug
  3. +7 −24 net/miniupnpd/files/miniupnpd.init
View
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=miniupnpd
-PKG_VERSION:=1.6.20120320
-PKG_RELEASE:=4
+PKG_VERSION:=1.6.20110730
+PKG_RELEASE:=6
PKG_SOURCE_URL:=http://miniupnp.free.fr/files
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=f2b1a82436e968880ab057cc6eb4ff7f
+PKG_MD5SUM:=8bd5c0447b6dc1101b96e958ee67d3ea
include $(INCLUDE_DIR)/package.mk
@@ -1,8 +1,8 @@
#!/bin/sh
-/etc/init.d/miniupnpd enabled && [ -n "`pidof miniupnpd`" ] && [ "$ACTION" = "ifup" ] && {
- local intif
- for intif in $(uci_get upnpd config internal_iface); do
- [ "$INTERFACE" = "$intif" ] && /etc/init.d/miniupnpd restart
+/etc/init.d/miniupnpd enabled && [ "$ACTION" = "ifup" ] && {
+ local iface
+ for iface in $(uci_get upnpd config internal_iface; uci_get upnpd config external_iface); do
+ [ "$INTERFACE" = "$iface" ] && /etc/init.d/miniupnpd restart
done
}
@@ -57,21 +57,8 @@ upnpd_write_bool() {
fi
}
-upnpd_netmask2prefix() {
- local octet
- local prefix=0
- local IFS="."
-
- set -- $1
-
- for octet in $1 $2 $3 $4; do
- while [ $octet -gt 0 ]; do
- prefix=$(($prefix + ($octet & 1)))
- octet=$(($octet >> 1))
- done
- done
-
- return $prefix
+boot() {
+ return
}
start() {
@@ -103,11 +90,10 @@ start() {
local args
- include /lib/network
- scan_interfaces
+ . /lib/functions/network.sh
local ifname
- config_get ifname ${extiface:-wan} ifname
+ network_get_device ifname ${extiface:-wan}
if [ -n "$conffile" ]; then
args="-f $conffile"
@@ -123,12 +109,9 @@ start() {
local iface
for iface in ${intiface:-lan}; do
- local ipaddr netmask
- config_get ipaddr "$iface" ipaddr
- config_get netmask "$iface" netmask "255.255.255.0"
- [ -n "$ipaddr" ] && {
- upnpd_netmask2prefix "$netmask"
- echo "listening_ip=$ipaddr/$?" >>$tmpconf
+ local ipnet
+ network_get_subnet ipnet "$iface" && {
+ echo "listening_ip=$ipnet" >>$tmpconf
}
done

0 comments on commit 97815a0

Please sign in to comment.