xtables-addons: fix RTSP conntrack compatibility with Linux 3.6
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 27 Nov 2012 18:31:44 +0000 (18:31 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 27 Nov 2012 18:31:44 +0000 (18:31 +0000)
SVN-Revision: 34391

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/100-add-rtsp-conntrack.patch
net/xtables-addons/patches/101-rtsp-linux-3.6-compat.patch [new file with mode: 0644]
net/xtables-addons/patches/200-add-lua-packetscript.patch
net/xtables-addons/patches/201-fix-lua-packetscript.patch
net/xtables-addons/patches/300-geoip-endian-detection.patch

index 07a864fab6fdf28fd3bb95e474780b5ac0acb270..7a3b36d46dd70dc863ea05fc09624ab05b5b0d95 100644 (file)
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=xtables-addons
 PKG_VERSION:=1.45
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_MD5SUM:=802d2f556a5e545f44e4b69937bf8490
index 87385fd681b9802b8c4e1ef8d8665228ced7d713..b31f9f16c53d61281ef9a808a9a1a3e2144b3c9e 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -11617,7 +11617,7 @@ regular_CFLAGS="-Wall -Waggregate-return
+@@ -11780,7 +11780,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
-@@ -43,7 +43,7 @@ regular_CFLAGS="-Wall -Waggregate-return
+@@ -44,7 +44,7 @@ regular_CFLAGS="-Wall -Waggregate-return
  
  if test -n "$kbuilddir"; then
        AC_MSG_CHECKING([kernel version that we will build against])
index d35c43062acf5c9338ab66035a82be31e8f69ac1..ae3911a97d10d052753304e5695a08c3ab09a4a0 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -30,7 +30,7 @@ xtlibdir="$(pkg-config --variable=xtlibd
+@@ -31,7 +31,7 @@ xtlibdir="$(pkg-config --variable=xtlibd
  
  AC_ARG_WITH([xtlibdir],
        AS_HELP_STRING([--with-xtlibdir=PATH],
index 1e155ce53bbaff7bc8a8e8c6f532d7f877ddf561..34cdc8c17cc959d3b15dd26600a0f027317ed722 100644 (file)
 +module_exit(fini);
 --- a/extensions/Kbuild
 +++ b/extensions/Kbuild
-@@ -33,6 +33,7 @@ obj-${build_lscan}       += xt_lscan.o
+@@ -35,6 +35,7 @@ obj-${build_lscan}       += xt_lscan.o
  obj-${build_pknock}      += pknock/
  obj-${build_psd}         += xt_psd.o
  obj-${build_quota2}      += xt_quota2.o
diff --git a/net/xtables-addons/patches/101-rtsp-linux-3.6-compat.patch b/net/xtables-addons/patches/101-rtsp-linux-3.6-compat.patch
new file mode 100644 (file)
index 0000000..b8e08b3
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/extensions/rtsp/nf_conntrack_rtsp.c
++++ b/extensions/rtsp/nf_conntrack_rtsp.c
+@@ -28,6 +28,7 @@
+  *                    - Port to new NF API
+  */
++#include <linux/version.h>
+ #include <linux/module.h>
+ #include <linux/netfilter.h>
+ #include <linux/ip.h>
+@@ -496,7 +497,11 @@ init(void)
+               } else {
+                       sprintf(tmpname, "rtsp-%d", i);
+               }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
++              strncpy(hlpr->name, tmpname, sizeof(hlpr->name));
++#else
+               hlpr->name = tmpname;
++#endif
+               pr_debug("port #%d: %d\n", i, ports[i]);
index 03fe5fa9ff78933c26323f4dbfaaf179fad526d3..1717bf527c7ebef49bd58e5010c97f2c38762287 100644 (file)
 +
 --- a/extensions/Kbuild
 +++ b/extensions/Kbuild
-@@ -34,6 +34,7 @@ obj-${build_pknock}      += pknock/
+@@ -36,6 +36,7 @@ obj-${build_pknock}      += pknock/
  obj-${build_psd}         += xt_psd.o
  obj-${build_quota2}      += xt_quota2.o
  obj-${build_rtsp}        += rtsp/
index 06a4a1739a50efc3c747d0abbe85820c3fb32fa0..966d29dfabef1d79a96663da4f37170258e19509 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
index 9957f74dac561c7a8a2a8b60bb0ff789a7a9cb43..842e7afcc7a034bcbc1207223473c150c7b38075 100644 (file)
@@ -1,6 +1,6 @@
 --- a/extensions/libxt_geoip.c
 +++ b/extensions/libxt_geoip.c
-@@ -59,13 +59,13 @@
+@@ -59,13 +59,13 @@ geoip_get_subnets(const char *code, uint
  
        /* Use simple integer vector files */
        if (nfproto == NFPROTO_IPV6) {