xtables-addons: fix RTSP conntrack compatibility with Linux 3.6
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 27 Nov 2012 18:31:44 +0000 (18:31 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 27 Nov 2012 18:31:44 +0000 (18:31 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@34391 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/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 07a864f..7a3b36d 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 87385fd..b31f9f1 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 d35c430..ae3911a 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 1e155ce..34cdc8c 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 03fe5fa..1717bf5 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 06a4a17..966d29d 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 9957f74..842e7af 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) {