packages: xtables-addons: update to 1.42
authorJonas Gorski <jogo@openwrt.org>
Fri, 13 Apr 2012 21:37:01 +0000 (21:37 +0000)
committerJonas Gorski <jogo@openwrt.org>
Fri, 13 Apr 2012 21:37:01 +0000 (21:37 +0000)
fixes compilation for 3.3 and 3.4.

SVN-Revision: 31282

net/xtables-addons/Makefile
net/xtables-addons/patches/002-fix-kernel-version-detection.patch
net/xtables-addons/patches/003-redundant-bracket.patch
net/xtables-addons/patches/004-linux_3_3_compat.patch [new file with mode: 0644]
net/xtables-addons/patches/100-add-rtsp-conntrack.patch
net/xtables-addons/patches/200-add-lua-packetscript.patch
net/xtables-addons/patches/201-fix-lua-packetscript.patch

index 3d733ebeb39f1c70190aaf8bea1564b300dc43f0..7c5d1c906a77ccd1da31577e394b5e3f46e2c8e4 100644 (file)
@@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=xtables-addons
-PKG_VERSION:=1.41
-PKG_RELEASE:=4
+PKG_VERSION:=1.42
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MD5SUM:=a8de5e5e5823aefcbab210159f122564
+PKG_MD5SUM:=7c996a0400667b57ab4fb53a013ae742
 PKG_SOURCE_URL:=@SF/xtables-addons
 PKG_BUILD_DEPENDS:=iptables
 PKG_INSTALL:=1
index 8bd1009e36bd45fdccc51b1aa148a83bc5638019..87385fd681b9802b8c4e1ef8d8665228ced7d713 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -11693,7 +11693,7 @@ regular_CFLAGS="-Wall -Waggregate-return
+@@ -11617,7 +11617,7 @@ regular_CFLAGS="-Wall -Waggregate-return
  if test -n "$kbuilddir"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel version that we will build against" >&5
  $as_echo_n "checking kernel version that we will build against... " >&6; }
@@ -11,7 +11,7 @@
        krel="${krel:${#kmajor}}";
 --- a/configure.ac
 +++ b/configure.ac
-@@ -44,7 +44,7 @@ regular_CFLAGS="-Wall -Waggregate-return
+@@ -43,7 +43,7 @@ regular_CFLAGS="-Wall -Waggregate-return
  
  if test -n "$kbuilddir"; then
        AC_MSG_CHECKING([kernel version that we will build against])
index 9bf0b54834e04ae013a875647e988716470907e6..d35c43062acf5c9338ab66035a82be31e8f69ac1 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -31,7 +31,7 @@ PKG_CHECK_MODULES([libmnl], [libmnl >= 1
+@@ -30,7 +30,7 @@ xtlibdir="$(pkg-config --variable=xtlibd
  
  AC_ARG_WITH([xtlibdir],
        AS_HELP_STRING([--with-xtlibdir=PATH],
diff --git a/net/xtables-addons/patches/004-linux_3_3_compat.patch b/net/xtables-addons/patches/004-linux_3_3_compat.patch
new file mode 100644 (file)
index 0000000..1259617
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/extensions/compat_xtables.h
++++ b/extensions/compat_xtables.h
+@@ -102,6 +102,8 @@
+ #     define nf_nat_ipv4_multi_range_compat nf_nat_multi_range_compat
+ #     define nf_nat_ipv4_range nf_nat_range
+ #     define NF_NAT_RANGE_MAP_IPS IP_NAT_RANGE_MAP_IPS
++#     define NF_NAT_MANIP_SRC IP_NAT_MANIP_SRC
++#     define NF_NAT_MANIP_DST IP_NAT_MANIP_DST
+ #endif
+ #if !defined(NIP6) && !defined(NIP6_FMT)
index 7212c7d9a8813ed459c90e0120dffd3bd932047e..1e155ce53bbaff7bc8a8e8c6f532d7f877ddf561 100644 (file)
 +#endif /* _IP_CONNTRACK_RTSP_H */
 --- /dev/null
 +++ b/extensions/rtsp/nf_nat_rtsp.c
-@@ -0,0 +1,489 @@
+@@ -0,0 +1,491 @@
 +/*
 + * RTSP extension for TCP NAT alteration
 + * (C) 2003 by Tom Marshall <tmarshall at real.com>
 +#define NF_NEED_MIME_NEXTLINE
 +#include "netfilter_mime.h"
 +
++#include "../compat_xtables.h"
++
 +#define MAX_PORTS       8
 +#define DSTACT_AUTO     0
 +#define DSTACT_STRIP    1
 +
 +static void expected(struct nf_conn* ct, struct nf_conntrack_expect *exp)
 +{
-+    struct nf_nat_multi_range_compat mr;
++    struct nf_nat_ipv4_multi_range_compat mr;
 +    u_int32_t newdstip, newsrcip, newip;
 +
 +    struct nf_conn *master = ct->master;
 +    newdstip = master->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip;
 +    newsrcip = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip;
 +    //FIXME (how to port that ?)
-+    //code from 2.4 : newip = (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC) ? newsrcip : newdstip;
++    //code from 2.4 : newip = (HOOK2MANIP(hooknum) == NF_NAT_MANIP_SRC) ? newsrcip : newdstip;
 +    newip = newdstip;
 +
 +    pr_debug("newsrcip=%pI4, newdstip=%pI4, newip=%pI4\n",
 +
 +    mr.rangesize = 1;
 +    // We don't want to manip the per-protocol, just the IPs. 
-+    mr.range[0].flags = IP_NAT_RANGE_MAP_IPS;
++    mr.range[0].flags = NF_NAT_RANGE_MAP_IPS;
 +    mr.range[0].min_ip = mr.range[0].max_ip = newip;
 +
-+    nf_nat_setup_info(ct, &mr.range[0], IP_NAT_MANIP_DST);
++    nf_nat_setup_info(ct, &mr.range[0], NF_NAT_MANIP_DST);
 +}
 +
 +
 +module_exit(fini);
 --- a/extensions/Kbuild
 +++ b/extensions/Kbuild
-@@ -34,6 +34,7 @@ obj-${build_lscan}       += xt_lscan.o
+@@ -33,6 +33,7 @@ obj-${build_lscan}       += xt_lscan.o
  obj-${build_pknock}      += pknock/
  obj-${build_psd}         += xt_psd.o
  obj-${build_quota2}      += xt_quota2.o
  -include ${M}/Kbuild.*
 --- a/mconfig
 +++ b/mconfig
-@@ -27,3 +27,4 @@ build_lscan=m
+@@ -26,3 +26,4 @@ build_lscan=m
  build_pknock=m
  build_psd=m
  build_quota2=m
index fc47a20b4322ff9ff6ba3ae0f114020ad2209eba..af7d1bc8eb73c267d06c75a3a9440477fb99cd75 100644 (file)
 +
 --- a/extensions/Kbuild
 +++ b/extensions/Kbuild
-@@ -35,6 +35,7 @@ obj-${build_pknock}      += pknock/
+@@ -34,6 +34,7 @@ obj-${build_pknock}      += pknock/
  obj-${build_psd}         += xt_psd.o
  obj-${build_quota2}      += xt_quota2.o
  obj-${build_rtsp}        += rtsp/
  -include ${M}/Kbuild.*
 --- a/extensions/Mbuild
 +++ b/extensions/Mbuild
-@@ -27,3 +27,4 @@ obj-${build_pknock}      += pknock/
+@@ -26,3 +26,4 @@ obj-${build_pknock}      += pknock/
  obj-${build_psd}         += libxt_psd.so
  obj-${build_quota2}      += libxt_quota2.so
  obj-${build_gradm}       += libxt_gradm.so
 +obj-${build_LUA}         += LUA/
 --- a/mconfig
 +++ b/mconfig
-@@ -28,3 +28,4 @@ build_pknock=m
+@@ -27,3 +27,4 @@ build_pknock=m
  build_psd=m
  build_quota2=m
  build_rtsp=m
index 966d29dfabef1d79a96663da4f37170258e19509..06a4a1739a50efc3c747d0abbe85820c3fb32fa0 100644 (file)
@@ -78,7 +78,7 @@
  #define UCHAR_MAX     255
  #define SHRT_MAX        32767
  #define BUFSIZ                8192
-@@ -637,6 +641,8 @@ union luai_Cast { double l_d; long l_l; 
+@@ -637,6 +641,8 @@ union luai_Cast { double l_d; long l_l;
  */
  #if defined(__KERNEL__)
  #undef LUA_USE_ULONGJMP