summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Barth2015-04-14 09:38:40 +0000
committerSteven Barth2015-04-14 09:38:40 +0000
commit2302e0b0b7a5b1971387e16743b39b34e591958e (patch)
tree65427aff07a670af1af18b150d50833916909ddd
parent35091bf789ddbf97d5b9e4b295ae46a6a851df40 (diff)
downloadrouting-2302e0b0b7a5b1971387e16743b39b34e591958e.tar.gz
miniupnpd: backport portrange-fix
Signed-off-by: Steven Barth <steven@midlink.org>
-rw-r--r--miniupnpd/Makefile2
-rw-r--r--miniupnpd/patches/001-fix-get_portmappings_in_range-in-non-expand-case.patch31
2 files changed, 32 insertions, 1 deletions
diff --git a/miniupnpd/Makefile b/miniupnpd/Makefile
index 6add41a..b134ec2 100644
--- a/miniupnpd/Makefile
+++ b/miniupnpd/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=miniupnpd
PKG_VERSION:=1.9.20150307
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://miniupnp.free.fr/files
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/miniupnpd/patches/001-fix-get_portmappings_in_range-in-non-expand-case.patch b/miniupnpd/patches/001-fix-get_portmappings_in_range-in-non-expand-case.patch
new file mode 100644
index 0000000..46409a1
--- /dev/null
+++ b/miniupnpd/patches/001-fix-get_portmappings_in_range-in-non-expand-case.patch
@@ -0,0 +1,31 @@
+From 3b472b59e00b2be96cc1ef56fe30b64e7404d9ec Mon Sep 17 00:00:00 2001
+From: Tomofumi Hayashi <s1061123@gmail.com>
+Date: Mon, 9 Mar 2015 17:33:10 +0900
+Subject: [PATCH] Fix get_portmappings_in_range() in non-expand case.
+
+In get_portmappings_in_range(), array[] is not updated when
+realloc() is not called, hence get_portmappings_in_range() is
+always null. This fix changes to fill array[].
+---
+ miniupnpd/netfilter/iptcrdr.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/miniupnpd/netfilter/iptcrdr.c b/miniupnpd/netfilter/iptcrdr.c
+index 99678e7..c7b8b7b 100644
+--- a/miniupnpd/netfilter/iptcrdr.c
++++ b/miniupnpd/netfilter/iptcrdr.c
+@@ -1434,9 +1434,9 @@ get_portmappings_in_range(unsigned short startport, unsigned short endport,
+ break;
+ }
+ array = tmp;
+- array[*number] = eport;
+- (*number)++;
+ }
++ array[*number] = eport;
++ (*number)++;
+ }
+ }
+ }
+--
+2.1.4
+