forked from pool/xtables-addons
Accepting request 880081 from security:netfilter
- Add sle-kernels.patch [boo#1183753] OBS-URL: https://build.opensuse.org/request/show/880081 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xtables-addons?expand=0&rev=74
This commit is contained in:
commit
f4c06a4c8a
32
sle-kernels.patch
Normal file
32
sle-kernels.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From: Jan Engelhardt <jengelh@inai.de>
|
||||||
|
Date: 2021-03-19 10:38:28.244573625 +0100
|
||||||
|
References: https://bugzilla.suse.com/show_bug.cgi?id=1183753
|
||||||
|
|
||||||
|
Workaround the SLE kernels misrepresenting themselves.
|
||||||
|
|
||||||
|
---
|
||||||
|
extensions/xt_TARPIT.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
Index: xtables-addons-3.18/extensions/xt_TARPIT.c
|
||||||
|
===================================================================
|
||||||
|
--- xtables-addons-3.18.orig/extensions/xt_TARPIT.c
|
||||||
|
+++ xtables-addons-3.18/extensions/xt_TARPIT.c
|
||||||
|
@@ -206,7 +206,7 @@ static void tarpit_tcp4(const struct xt_
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* This packet will not be the same as the other: clear nf fields */
|
||||||
|
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) || defined(SLE_15_3)
|
||||||
|
nf_reset_ct(nskb);
|
||||||
|
#else
|
||||||
|
nf_reset(nskb);
|
||||||
|
@@ -352,7 +352,7 @@ static void tarpit_tcp6(const struct xt_
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This packet will not be the same as the other: clear nf fields */
|
||||||
|
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) || defined(SLE_15_3)
|
||||||
|
nf_reset_ct(nskb);
|
||||||
|
#else
|
||||||
|
nf_reset(nskb);
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 19 09:37:36 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- Add sle-kernels.patch [boo#1183753]
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Mar 11 16:14:44 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
|
Thu Mar 11 16:14:44 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
@ -29,8 +29,11 @@ Source: https://inai.de/files/%name/%name-%version.tar.xz
|
|||||||
Source2: https://inai.de/files/%name/%name-%version.tar.asc
|
Source2: https://inai.de/files/%name/%name-%version.tar.asc
|
||||||
Source3: %name-preamble
|
Source3: %name-preamble
|
||||||
Source4: %name.keyring
|
Source4: %name.keyring
|
||||||
|
Patch1: sle-kernels.patch
|
||||||
BuildRequires: %kernel_module_package_buildreqs
|
BuildRequires: %kernel_module_package_buildreqs
|
||||||
|
BuildRequires: automake
|
||||||
BuildRequires: kernel-syms >= 4.15
|
BuildRequires: kernel-syms >= 4.15
|
||||||
|
BuildRequires: libtool
|
||||||
BuildRequires: pkg-config >= 0.21
|
BuildRequires: pkg-config >= 0.21
|
||||||
BuildRequires: xz
|
BuildRequires: xz
|
||||||
BuildRequires: pkgconfig(xtables) >= 1.6.0
|
BuildRequires: pkgconfig(xtables) >= 1.6.0
|
||||||
@ -69,8 +72,13 @@ main kernel/iptables packages.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
autoreconf -fiv
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if 0%{?sle_version} == 150300
|
||||||
|
export KCFLAGS="-DSLE_15_3"
|
||||||
|
echo "$KCFLAGS" >kcflags
|
||||||
|
%endif
|
||||||
pushd ../
|
pushd ../
|
||||||
for flavor in %flavors_to_build; do
|
for flavor in %flavors_to_build; do
|
||||||
cp -a "%name-%version" "%name-$flavor-%version"
|
cp -a "%name-%version" "%name-$flavor-%version"
|
||||||
@ -82,10 +90,12 @@ done
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
b="%buildroot"
|
b="%buildroot"
|
||||||
|
# kernel's make install is picky about flags changing between %%build and %%install
|
||||||
|
export KCFLAGS="$(cat kcflags)"
|
||||||
pushd ../
|
pushd ../
|
||||||
for flavor in %flavors_to_build; do
|
for flavor in %flavors_to_build; do
|
||||||
pushd "%name-$flavor-%version/"
|
pushd "%name-$flavor-%version/"
|
||||||
make %{?linux_make_arch} install DESTDIR="$b"
|
make %{?linux_make_arch} install DESTDIR="$b" V=1
|
||||||
popd
|
popd
|
||||||
done
|
done
|
||||||
# There is no -devel package. So no need for these files.
|
# There is no -devel package. So no need for these files.
|
||||||
|
Loading…
Reference in New Issue
Block a user