From 239675b87afa7c93d25470ca2685e516ada4aced Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 27 Nov 2012 18:31:44 +0000 Subject: [PATCH] xtables-addons: fix RTSP conntrack compatibility with Linux 3.6 SVN-Revision: 34391 --- net/xtables-addons/Makefile | 2 +- .../002-fix-kernel-version-detection.patch | 4 ++-- .../patches/003-redundant-bracket.patch | 2 +- .../patches/100-add-rtsp-conntrack.patch | 2 +- .../patches/101-rtsp-linux-3.6-compat.patch | 22 +++++++++++++++++++ .../patches/200-add-lua-packetscript.patch | 2 +- .../patches/201-fix-lua-packetscript.patch | 2 +- .../patches/300-geoip-endian-detection.patch | 2 +- 8 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 net/xtables-addons/patches/101-rtsp-linux-3.6-compat.patch diff --git a/net/xtables-addons/Makefile b/net/xtables-addons/Makefile index 07a864fab6..7a3b36d46d 100644 --- a/net/xtables-addons/Makefile +++ b/net/xtables-addons/Makefile @@ -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 diff --git a/net/xtables-addons/patches/002-fix-kernel-version-detection.patch b/net/xtables-addons/patches/002-fix-kernel-version-detection.patch index 87385fd681..b31f9f16c5 100644 --- a/net/xtables-addons/patches/002-fix-kernel-version-detection.patch +++ b/net/xtables-addons/patches/002-fix-kernel-version-detection.patch @@ -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]) diff --git a/net/xtables-addons/patches/003-redundant-bracket.patch b/net/xtables-addons/patches/003-redundant-bracket.patch index d35c43062a..ae3911a97d 100644 --- a/net/xtables-addons/patches/003-redundant-bracket.patch +++ b/net/xtables-addons/patches/003-redundant-bracket.patch @@ -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], diff --git a/net/xtables-addons/patches/100-add-rtsp-conntrack.patch b/net/xtables-addons/patches/100-add-rtsp-conntrack.patch index 1e155ce53b..34cdc8c17c 100644 --- a/net/xtables-addons/patches/100-add-rtsp-conntrack.patch +++ b/net/xtables-addons/patches/100-add-rtsp-conntrack.patch @@ -1317,7 +1317,7 @@ +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 index 0000000000..b8e08b3a32 --- /dev/null +++ b/net/xtables-addons/patches/101-rtsp-linux-3.6-compat.patch @@ -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 + #include + #include + #include +@@ -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]); + diff --git a/net/xtables-addons/patches/200-add-lua-packetscript.patch b/net/xtables-addons/patches/200-add-lua-packetscript.patch index 03fe5fa9ff..1717bf527c 100644 --- a/net/xtables-addons/patches/200-add-lua-packetscript.patch +++ b/net/xtables-addons/patches/200-add-lua-packetscript.patch @@ -18206,7 +18206,7 @@ + --- 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/ diff --git a/net/xtables-addons/patches/201-fix-lua-packetscript.patch b/net/xtables-addons/patches/201-fix-lua-packetscript.patch index 06a4a1739a..966d29dfab 100644 --- a/net/xtables-addons/patches/201-fix-lua-packetscript.patch +++ b/net/xtables-addons/patches/201-fix-lua-packetscript.patch @@ -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 diff --git a/net/xtables-addons/patches/300-geoip-endian-detection.patch b/net/xtables-addons/patches/300-geoip-endian-detection.patch index 9957f74dac..842e7afcc7 100644 --- a/net/xtables-addons/patches/300-geoip-endian-detection.patch +++ b/net/xtables-addons/patches/300-geoip-endian-detection.patch @@ -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) { -- 2.30.2