xtables-addons: update to version 2.3, adds linux 3.10 compatibility
authorFelix Fietkau <nbd@openwrt.org>
Wed, 10 Jul 2013 14:51:13 +0000 (14:51 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 10 Jul 2013 14:51:13 +0000 (14:51 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37226

package/network/utils/xtables-addons/Makefile
package/network/utils/xtables-addons/patches/001-no_depmod.patch
package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch
package/network/utils/xtables-addons/patches/003-fix-kernel-3.9.patch
package/network/utils/xtables-addons/patches/102-rtsp-linux-3.7-compat.patch
package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch
package/network/utils/xtables-addons/patches/400-uid-gid-linux-3.7-compat.patch [deleted file]

index 10bafd14e75e44e509030e68b9d1b746c7979e71..44cd272ea42030428707fa1cf320ab35f92f1e37 100644 (file)
@@ -10,9 +10,9 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=xtables-addons
 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.7.0)),1)
-PKG_VERSION:=2.1
+PKG_VERSION:=2.3
 PKG_RELEASE:=1
-PKG_MD5SUM:=b624fc57bbda9e15c33a6471e4ec75e1
+PKG_MD5SUM:=7d942729c365a549513511061f74c3e3
 else
 PKG_VERSION:=1.45
 PKG_RELEASE:=3
index 9905af172b5a0d482d85d7334a764429d9da154a..54d624ccd7fc9bb321a91b5c3c2804bde6ef084c 100644 (file)
@@ -11,6 +11,6 @@
 -install-exec-hook:
 -      depmod -a || :;
 -
- config.status: Makefile.iptrules.in
+ clean-local-mans:
+       ${MAKE} -f Makefile.mans clean;
  
- tmpdir := $(shell mktemp -dtu)
index 8dc63844787b50b4580ca9d5e1afbb5986a2d710..f7c877b44bcb93dee839ca83a06422cc77e5f3d9 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -11892,7 +11892,7 @@ regular_CFLAGS="-Wall -Waggregate-return
+@@ -11895,7 +11895,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; }
index e77e14d2e89b78288e4a55ee787e44cf8c40a125..8eac698bfacca1959ba22fa13ab0648243e3cf84 100644 (file)
@@ -1,8 +1,8 @@
 --- a/extensions/compat_xtables.h
 +++ b/extensions/compat_xtables.h
-@@ -57,4 +57,11 @@
- #define xt_request_find_match xtnu_request_find_match
+@@ -82,4 +82,11 @@ static inline void proc_remove(struct pr
+ }
+ #endif
  
 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
 +static inline void proc_net_remove(struct net *net, const char *name)
index 216d7cb784155372bad23d3c75cb04f43f22b5bb..0fe7917cff506ffc01180e2f876b9ec00209e8cc 100644 (file)
@@ -72,7 +72,7 @@
  {
      char*       ptcp;
      uint        tcplen;
-@@ -256,7 +256,7 @@ rtsp_mangle_tran(enum ip_conntrack_info
+@@ -256,7 +256,7 @@ rtsp_mangle_tran(enum ip_conntrack_info 
                  if (dstact == DSTACT_STRIP || (dstact == DSTACT_AUTO && !is_stun))
                  {
                      diff = nextfieldoff-off;
@@ -81,7 +81,7 @@
                                                           off, diff, NULL, 0))
                      {
                          /* mangle failed, all we can do is bail */
-@@ -326,7 +326,7 @@ rtsp_mangle_tran(enum ip_conntrack_info
+@@ -326,7 +326,7 @@ rtsp_mangle_tran(enum ip_conntrack_info 
                       * parameter 4 below is offset from start of tcp data.
                       */
                      diff = origlen-rbuflen;
@@ -90,7 +90,7 @@
                                                origoff, origlen, rbuf, rbuflen))
                      {
                          /* mangle failed, all we can do is bail */
-@@ -351,7 +351,7 @@ rtsp_mangle_tran(enum ip_conntrack_info
+@@ -351,7 +351,7 @@ rtsp_mangle_tran(enum ip_conntrack_info 
  }
  
  static uint
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
diff --git a/package/network/utils/xtables-addons/patches/400-uid-gid-linux-3.7-compat.patch b/package/network/utils/xtables-addons/patches/400-uid-gid-linux-3.7-compat.patch
deleted file mode 100644 (file)
index 8a5be0d..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
---- a/extensions/xt_DNETMAP.c
-+++ b/extensions/xt_DNETMAP.c
-@@ -21,6 +21,7 @@
- #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
- #include <linux/inet.h>
- #include <linux/ip.h>
-+#include <linux/version.h>
- #include <linux/module.h>
- #include <linux/netdevice.h>
- #include <linux/netfilter.h>
-@@ -328,8 +329,8 @@ static int dnetmap_tg_check(const struct
-               ret = -ENOMEM;
-               goto out;
-       }
--      pde_data->uid = proc_uid;
--      pde_data->gid = proc_gid;
-+      pde_data->uid = XT_UID(proc_uid);
-+      pde_data->gid = XT_GID(proc_gid);
-       /* statistics */
-       pde_stat = create_proc_entry(p->proc_str_stat, proc_perms,
-@@ -341,8 +342,8 @@ static int dnetmap_tg_check(const struct
-       }
-       pde_stat->data = p;
-       pde_stat->read_proc = dnetmap_stat_proc_read;
--      pde_stat->uid = proc_uid;
--      pde_stat->gid = proc_gid;
-+      pde_stat->uid = XT_UID(proc_uid);
-+      pde_stat->gid = XT_GID(proc_gid);
- #endif
-       spin_lock_bh(&dnetmap_lock);
---- a/extensions/xt_condition.c
-+++ b/extensions/xt_condition.c
-@@ -14,6 +14,7 @@
-  */
- #include <linux/kernel.h>
- #include <linux/list.h>
-+#include <linux/version.h>
- #include <linux/module.h>
- #include <linux/proc_fs.h>
- #include <linux/spinlock.h>
-@@ -155,8 +156,8 @@ static int condition_mt_check(const stru
-       var->status_proc->read_proc  = condition_proc_read;
-       var->status_proc->write_proc = condition_proc_write;
-       list_add(&var->list, &conditions_list);
--      var->status_proc->uid = condition_uid_perms;
--      var->status_proc->gid = condition_gid_perms;
-+      var->status_proc->uid = XT_UID(condition_uid_perms);
-+      var->status_proc->gid = XT_GID(condition_gid_perms);
-       mutex_unlock(&proc_lock);
-       info->condvar = var;
-       return 0;
---- a/extensions/compat_xtables.h
-+++ b/extensions/compat_xtables.h
-@@ -12,6 +12,14 @@
- #     warning Kernels below 3.7 not supported.
- #endif
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
-+#  define XT_UID(x) KUIDT_INIT(x)
-+#  define XT_GID(x) KGIDT_INIT(x)
-+#else
-+#  define XT_UID(x) (x)
-+#  define XT_GID(x) (x)
-+#endif
-+
- #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
- #     if !defined(CONFIG_NF_CONNTRACK_MARK)
- #             warning You have CONFIG_NF_CONNTRACK enabled, but CONFIG_NF_CONNTRACK_MARK is not (please enable).
---- a/extensions/xt_quota2.c
-+++ b/extensions/xt_quota2.c
-@@ -131,8 +131,8 @@ q2_get_counter(const struct xt_quota_mti
-       p->data         = e;
-       p->read_proc    = quota_proc_read;
-       p->write_proc   = quota_proc_write;
--      p->uid          = quota_list_uid;
--      p->gid          = quota_list_gid;
-+      p->uid          = XT_UID(quota_list_uid);
-+      p->gid          = XT_GID(quota_list_gid);
-       list_add_tail(&e->list, &counter_list);
-       spin_unlock_bh(&counter_list_lock);
-       return e;