]> git.pld-linux.org Git - packages/ipset.git/commitdiff
- up to 6.32 auto/th/ipset-6.32-1
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 25 Mar 2017 19:46:18 +0000 (20:46 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 25 Mar 2017 19:46:18 +0000 (20:46 +0100)
- fix building with linux 4.10

ipset.spec
linux-4.10.patch [new file with mode: 0644]

index 782ac20c4c839f4fc1579311db87c28faa35d0fd..a41ce94876655d32527c92c456e87c7f54ed11c7 100644 (file)
@@ -27,14 +27,15 @@ exit 1
 Summary:       IP sets utility
 Summary(pl.UTF-8):     Narzędzie do zarządzania zbiorami IP
 Name:          %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
-Version:       6.30
+Version:       6.32
 Release:       %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
 License:       GPL v2
 Group:         Networking/Admin
 #Source0Download: http://ipset.netfilter.org/install.html
 Source0:       http://ipset.netfilter.org/%{pname}-%{version}.tar.bz2
-# Source0-md5: 41c32e3b884ec714f0aac95e7675f9d1
+# Source0-md5: 857a5c6a6d645196865a82bf6fd7f567
 Source1:       %{pname}.init
+Patch0:                linux-4.10.patch
 URL:           http://ipset.netfilter.org/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
@@ -185,6 +186,7 @@ done\
 
 %prep
 %setup -q -n %{pname}-%{version}
+%patch0 -p1
 
 %build
 %{__aclocal}
diff --git a/linux-4.10.patch b/linux-4.10.patch
new file mode 100644 (file)
index 0000000..25a1a8d
--- /dev/null
@@ -0,0 +1,139 @@
+--- ipset-6.32/kernel/net/netfilter/xt_set.c.orig      2017-03-12 18:41:03.000000000 +0100
++++ ipset-6.32/kernel/net/netfilter/xt_set.c   2017-03-25 20:09:19.407499549 +0100
+@@ -72,7 +72,7 @@
+ {
+       const struct xt_set_info_match_v0 *info = par->matchinfo;
+-      ADT_OPT(opt, par->family, info->match_set.u.compat.dim,
++      ADT_OPT(opt, xt_family(par), info->match_set.u.compat.dim,
+               info->match_set.u.compat.flags, 0, UINT_MAX);
+       return match_set(info->match_set.index, skb, par, &opt,
+@@ -135,7 +135,7 @@
+ {
+       const struct xt_set_info_match_v1 *info = par->matchinfo;
+-      ADT_OPT(opt, par->family, info->match_set.dim,
++      ADT_OPT(opt, xt_family(par), info->match_set.dim,
+               info->match_set.flags, 0, UINT_MAX);
+       if (opt.flags & IPSET_RETURN_NOMATCH)
+@@ -201,7 +201,7 @@
+       const struct xt_set_info_match_v3 *info = par->matchinfo;
+       int ret;
+-      ADT_OPT(opt, par->family, info->match_set.dim,
++      ADT_OPT(opt, xt_family(par), info->match_set.dim,
+               info->match_set.flags, info->flags, UINT_MAX);
+       if (info->packets.op != IPSET_COUNTER_NONE ||
+@@ -248,7 +248,7 @@
+       const struct xt_set_info_match_v4 *info = par->matchinfo;
+       int ret;
+-      ADT_OPT(opt, par->family, info->match_set.dim,
++      ADT_OPT(opt, xt_family(par), info->match_set.dim,
+               info->match_set.flags, info->flags, UINT_MAX);
+       if (info->packets.op != IPSET_COUNTER_NONE ||
+@@ -284,9 +284,9 @@
+ {
+       const struct xt_set_info_target_v0 *info = par->targinfo;
+-      ADT_OPT(add_opt, par->family, info->add_set.u.compat.dim,
++      ADT_OPT(add_opt, xt_family(par), info->add_set.u.compat.dim,
+               info->add_set.u.compat.flags, 0, UINT_MAX);
+-      ADT_OPT(del_opt, par->family, info->del_set.u.compat.dim,
++      ADT_OPT(del_opt, xt_family(par), info->del_set.u.compat.dim,
+               info->del_set.u.compat.flags, 0, UINT_MAX);
+       if (info->add_set.index != IPSET_INVALID_ID)
+@@ -362,9 +362,9 @@
+ {
+       const struct xt_set_info_target_v1 *info = par->targinfo;
+-      ADT_OPT(add_opt, par->family, info->add_set.dim,
++      ADT_OPT(add_opt, xt_family(par), info->add_set.dim,
+               info->add_set.flags, 0, UINT_MAX);
+-      ADT_OPT(del_opt, par->family, info->del_set.dim,
++      ADT_OPT(del_opt, xt_family(par), info->del_set.dim,
+               info->del_set.flags, 0, UINT_MAX);
+       if (info->add_set.index != IPSET_INVALID_ID)
+@@ -436,9 +436,9 @@
+ {
+       const struct xt_set_info_target_v2 *info = par->targinfo;
+-      ADT_OPT(add_opt, par->family, info->add_set.dim,
++      ADT_OPT(add_opt, xt_family(par), info->add_set.dim,
+               info->add_set.flags, info->flags, info->timeout);
+-      ADT_OPT(del_opt, par->family, info->del_set.dim,
++      ADT_OPT(del_opt, xt_family(par), info->del_set.dim,
+               info->del_set.flags, 0, UINT_MAX);
+       /* Normalize to fit into jiffies */
+@@ -468,11 +468,11 @@
+       const struct xt_set_info_target_v3 *info = par->targinfo;
+       int ret;
+-      ADT_OPT(add_opt, par->family, info->add_set.dim,
++      ADT_OPT(add_opt, xt_family(par), info->add_set.dim,
+               info->add_set.flags, info->flags, info->timeout);
+-      ADT_OPT(del_opt, par->family, info->del_set.dim,
++      ADT_OPT(del_opt, xt_family(par), info->del_set.dim,
+               info->del_set.flags, 0, UINT_MAX);
+-      ADT_OPT(map_opt, par->family, info->map_set.dim,
++      ADT_OPT(map_opt, xt_family(par), info->map_set.dim,
+               info->map_set.flags, 0, UINT_MAX);
+       /* Normalize to fit into jiffies */
+--- ipset-6.32/kernel/net/netfilter/ipset/ip_set_hash_netiface.c.orig  2017-03-12 18:41:03.000000000 +0100
++++ ipset-6.32/kernel/net/netfilter/ipset/ip_set_hash_netiface.c       2017-03-25 20:21:11.890900536 +0100
+@@ -170,7 +170,8 @@
+       ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip);
+       e.ip &= ip_set_netmask(e.cidr);
+-#define IFACE(dir)    (par->dir ? par->dir->name : "")
++#define IFACEIN               (xt_in(par) ? xt_in(par)->name : "")
++#define IFACEOUT      (xt_out(par) ? xt_out(par)->name : "")
+ #define SRCDIR                (opt->flags & IPSET_DIM_TWO_SRC)
+       if (opt->cmdflags & IPSET_FLAG_PHYSDEV) {
+@@ -184,7 +185,7 @@
+               e.physdev = 1;
+ #endif
+       } else {
+-              STRLCPY(e.iface, SRCDIR ? IFACE(in) : IFACE(out));
++              STRLCPY(e.iface, SRCDIR ? IFACEIN : IFACEOUT);
+       }
+       if (strlen(e.iface) == 0)
+@@ -392,7 +393,7 @@
+               e.physdev = 1;
+ #endif
+       } else {
+-              STRLCPY(e.iface, SRCDIR ? IFACE(in) : IFACE(out));
++              STRLCPY(e.iface, SRCDIR ? IFACEIN : IFACEOUT);
+       }
+       if (strlen(e.iface) == 0)
+--- ipset-6.32/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in.orig    2017-03-25 20:11:14.791803460 +0100
++++ ipset-6.32/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in 2017-03-25 20:27:17.970438585 +0100
+@@ -285,10 +285,16 @@
+ }
+ #endif
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
++#define xt_in(par) par->in
++#define xt_out(par) par->out
++#define xt_family(par) par->family
++#endif
++
+ #ifdef HAVE_NET_IN_XT_ACTION_PARAM
+ #define IPSET_DEV_NET(par)    (par)->net
+ #else
+-#define IPSET_DEV_NET(par)    dev_net((par)->in ? (par)->in : (par)->out)
++#define IPSET_DEV_NET(par)    dev_net(xt_in(par) ? xt_in(par) : xt_out(par))
+ #endif
+ #ifndef smp_mb__before_atomic
This page took 0.073513 seconds and 4 git commands to generate.