Resolve bz#1411127 for Rawhide, too

This commit is contained in:
Phil Sutter 2017-01-13 14:46:17 +01:00
parent 704fd20f88
commit d57a56be09
2 changed files with 47 additions and 1 deletions

View File

@ -0,0 +1,36 @@
From 34ea60b5b7645e96c600b8073dd82ac65144d711 Mon Sep 17 00:00:00 2001
From: Phil Sutter <phil@nwl.cc>
Date: Thu, 12 Jan 2017 15:12:26 +0100
Subject: [iproute PATCH] tc: m_xt: Fix segfault with iptables-1.6.0
Said iptables version introduced struct xtables_globals field
'compat_rev', a function pointer. Initializing it is mandatory as
libxtables calls it without existence check.
Without this, tc segfaults when using the xt action like so:
| tc filter add dev d0 parent ffff: u32 match u32 0 0 \
| action xt -j MARK --set-mark 20
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
tc/m_xt.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tc/m_xt.c b/tc/m_xt.c
index dbb54981462ee..57ed40d7aa3a8 100644
--- a/tc/m_xt.c
+++ b/tc/m_xt.c
@@ -77,6 +77,9 @@ static struct xtables_globals tcipt_globals = {
.orig_opts = original_opts,
.opts = original_opts,
.exit_err = NULL,
+#if (XTABLES_VERSION_CODE >= 11)
+ .compat_rev = xtables_compatible_revision,
+#endif
};
/*
--
2.11.0

View File

@ -2,7 +2,7 @@
Summary: Advanced IP routing and network device configuration tools
Name: iproute
Version: 4.8.0
Release: 1%{?dist}
Release: 2%{?dist}
Group: Applications/System
URL: http://kernel.org/pub/linux/utils/net/%{name}2/
Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz
@ -16,6 +16,12 @@ Source2: avpkt
# https://github.com/pavlix/iproute2/commits/fedora
Patch1: 0001-Documentation-fixes.patch
# Fix for bz#1411127
#
# Accepted upstream:
# https://patchwork.ozlabs.org/patch/714480/
Patch2: 0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch
License: GPLv2+ and Public Domain
BuildRequires: bison
BuildRequires: elfutils-libelf-devel
@ -78,6 +84,7 @@ The libnetlink static library.
%prep
%setup -q -n %{name}2-%{version}
%patch1 -p1
%patch2 -p1
%build
export CFLAGS="%{optflags}"
@ -161,6 +168,9 @@ rm -rf '%{buildroot}%{_docdir}'
%{_includedir}/libnetlink.h
%changelog
* Fri Jan 13 2017 Phil Sutter <psutter@redhat.com> - 4.8.0-2
- Fix segfault in xt action
* Wed Nov 30 2016 Phil Sutter <psutter@redhat.com> - 4.8.0-1
- New version 4.8.0