include Config
-VER = 1.4
+VER = 1.7
THISAPP = miniupnpd-$(VER)
DL_FILE = $(THISAPP).tar.gz
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = ffa33d4ed8732c662bdb7d511e86db76
+$(DL_FILE)_MD5 = 5af9e8332d34a7b490d0d2ed3e674196
install : $(TARGET)
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/miniupnpd-iptcrdr.patch
- cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/miniupnpd-1.4_use_XT_ALIGN.patch
cd $(DIR_APP) && make -f Makefile.linux \
CFLAGS="$(CFLAGS) -DIPTABLES_143 -I/usr/src/linux/include"
-
cd $(DIR_APP) && install -m 755 miniupnpd /usr/sbin
-mkdir -pv /etc/miniupnpd
cp -vf $(DIR_SRC)/config/miniupnpd/miniupnpd.conf /etc/miniupnpd/miniupnpd.conf
+++ /dev/null
-diff -Naur miniupnpd-1.4.org/netfilter/iptcrdr.c miniupnpd-1.4/netfilter/iptcrdr.c
---- miniupnpd-1.4.org/netfilter/iptcrdr.c 2009-10-10 21:19:41.000000000 +0200
-+++ miniupnpd-1.4/netfilter/iptcrdr.c 2012-07-29 16:09:42.640363971 +0200
-@@ -443,8 +443,8 @@
- struct ipt_entry_match *match;
- struct ipt_tcp * tcpinfo;
- size_t size;
-- size = IPT_ALIGN(sizeof(struct ipt_entry_match))
-- + IPT_ALIGN(sizeof(struct ipt_tcp));
-+ size = XT_ALIGN(sizeof(struct ipt_entry_match))
-+ + XT_ALIGN(sizeof(struct ipt_tcp));
- match = calloc(1, size);
- match->u.match_size = size;
- strncpy(match->u.user.name, "tcp", IPT_FUNCTION_MAXNAMELEN);
-@@ -462,8 +462,8 @@
- struct ipt_entry_match *match;
- struct ipt_udp * udpinfo;
- size_t size;
-- size = IPT_ALIGN(sizeof(struct ipt_entry_match))
-- + IPT_ALIGN(sizeof(struct ipt_udp));
-+ size = XT_ALIGN(sizeof(struct ipt_entry_match))
-+ + XT_ALIGN(sizeof(struct ipt_udp));
- match = calloc(1, size);
- match->u.match_size = size;
- strncpy(match->u.user.name, "udp", IPT_FUNCTION_MAXNAMELEN);
-@@ -483,8 +483,8 @@
- struct ip_nat_range * range;
- size_t size;
-
-- size = IPT_ALIGN(sizeof(struct ipt_entry_target))
-- + IPT_ALIGN(sizeof(struct ip_nat_multi_range));
-+ size = XT_ALIGN(sizeof(struct ipt_entry_target))
-+ + XT_ALIGN(sizeof(struct ip_nat_multi_range));
- target = calloc(1, size);
- target->u.target_size = size;
- strncpy(target->u.user.name, "DNAT", IPT_FUNCTION_MAXNAMELEN);
-@@ -614,8 +614,8 @@
- {
- struct ipt_entry_target * target = NULL;
- size_t size;
-- size = IPT_ALIGN(sizeof(struct ipt_entry_target))
-- + IPT_ALIGN(sizeof(int));
-+ size = XT_ALIGN(sizeof(struct ipt_entry_target))
-+ + XT_ALIGN(sizeof(int));
- target = calloc(1, size);
- target->u.user.target_size = size;
- strncpy(target->u.user.name, "ACCEPT", IPT_FUNCTION_MAXNAMELEN);
+++ /dev/null
---- netfilter/iptcrdr.c.old 2010-02-24 14:22:23.000000000 +0100
-+++ netfilter/iptcrdr.c 2010-02-24 14:48:00.000000000 +0100
-@@ -20,6 +20,13 @@
-
- #if IPTABLES_143
- /* IPTABLES API version >= 1.4.3 */
-+
-+#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
-+#define __must_be_array(a) \
-+ BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0])))
-+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
-+#define LIST_POISON2 ((void *) 0x00200200 )
-+
- #include <net/netfilter/nf_nat.h>
- #define ip_nat_multi_range nf_nat_multi_range
- #define ip_nat_range nf_nat_range