From 586530d09ef471a068bb34be38b2db9c3ed3ba05 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sat, 4 Jul 2015 10:04:41 +0200 Subject: [PATCH] - uopdated to 2.6 - fixed building with linux 4.1 --- linux-4.1.patch | 54 +++++++++++++++++++++++++++++++++++++++++++++ xtables-addons.spec | 8 ++++--- 2 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 linux-4.1.patch diff --git a/linux-4.1.patch b/linux-4.1.patch new file mode 100644 index 0000000..77cf1d2 --- /dev/null +++ b/linux-4.1.patch @@ -0,0 +1,54 @@ +--- a/extensions/xt_TARPIT.c 2014-09-29 03:33:13.000000000 -0500 ++++ b/extensions/xt_TARPIT.c 2015-06-29 11:38:26.582851153 -0500 +@@ -250,7 +250,11 @@ + + #ifdef CONFIG_BRIDGE_NETFILTER + if (hook != NF_INET_FORWARD || (nskb->nf_bridge != NULL && ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0) + nskb->nf_bridge->mask & BRNF_BRIDGED)) ++#else ++ nskb->nf_bridge->physoutdev)) ++#endif + #else + if (hook != NF_INET_FORWARD) + #endif +@@ -279,7 +279,12 @@ + + nf_ct_attach(nskb, oldskb); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0) + NF_HOOK(NFPROTO_IPV4, NF_INET_LOCAL_OUT, nskb, NULL, + skb_dst(nskb)->dev, dst_output); ++#else ++ NF_HOOK(NFPROTO_IPV4, NF_INET_LOCAL_OUT, NULL, nskb, NULL, ++ skb_dst(nskb)->dev, dst_output_sk); ++#endif + return; + +@@ -394,7 +394,12 @@ + + nf_ct_attach(nskb, oldskb); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0) + NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_OUT, nskb, NULL, + skb_dst(nskb)->dev, dst_output); ++#else ++ NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_OUT, NULL, nskb, NULL, ++ skb_dst(nskb)->dev, dst_output_sk); ++#endif + return; + +--- a/extensions/xt_DELUDE.c 2014-09-29 03:33:13.000000000 -0500 ++++ b/extensions/xt_DELUDE.c 2015-06-29 10:10:00.622867945 -0500 +@@ -107,7 +107,11 @@ + addr_type = RTN_UNSPEC; + #ifdef CONFIG_BRIDGE_NETFILTER + if (hook != NF_INET_FORWARD || (nskb->nf_bridge != NULL && ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0) + nskb->nf_bridge->mask & BRNF_BRIDGED)) ++#else ++ nskb->nf_bridge->physoutdev)) ++#endif + #else + if (hook != NF_INET_FORWARD) + #endif diff --git a/xtables-addons.spec b/xtables-addons.spec index f261ca4..e9061ca 100644 --- a/xtables-addons.spec +++ b/xtables-addons.spec @@ -21,17 +21,18 @@ exit 1 %define _enable_debug_packages 0 %endif -%define rel 3 +%define rel 1 %define pname xtables-addons Summary: Additional extensions for xtables packet filtering system Summary(pl.UTF-8): Dodatkowe rozszerzenia do systemu filtrowania pakietów xtables Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel} -Version: 2.5 +Version: 2.6 Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}} License: GPL v2 Group: Networking/Admin Source0: http://downloads.sourceforge.net/xtables-addons/%{pname}-%{version}.tar.xz -# Source0-md5: 335663ece5fb17c7d0bb24dbdc697eb1 +# Source0-md5: 087835ba7e564481b6fd398692268340 +Patch0: linux-4.1.patch URL: http://xtables-addons.sourceforge.net/ BuildRequires: autoconf >= 2.65 BuildRequires: automake >= 1:1.11 @@ -110,6 +111,7 @@ done\ %prep %setup -q -n %{pname}-%{version} +%patch0 -p1 %build %configure \ -- 2.43.0