packages: xtables-addons: update to 1.42
authorjogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 13 Apr 2012 21:37:01 +0000 (21:37 +0000)
committerjogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 13 Apr 2012 21:37:01 +0000 (21:37 +0000)
fixes compilation for 3.3 and 3.4.

git-svn-id: svn://svn.openwrt.org/openwrt/packages@31282 3c298f89-4303-0410-b956-a3cf2f4a3e73

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 3d733eb..7c5d1c9 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 8bd1009..87385fd 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 9bf0b54..d35c430 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 7212c7d..1e155ce 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 fc47a20..af7d1bc 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 966d29d..06a4a17 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