|
|
4aca6e |
From cff7ec6ee4af587761cae0819471cb28d48463d8 Mon Sep 17 00:00:00 2001
|
|
|
4aca6e |
From: Phil Sutter <psutter@redhat.com>
|
|
|
4aca6e |
Date: Tue, 4 Apr 2017 16:26:50 +0200
|
|
|
4aca6e |
Subject: [PATCH] tc: m_xt: Fix segfault with iptables-1.6.0
|
|
|
4aca6e |
|
|
|
4aca6e |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1326726
|
|
|
4aca6e |
Upstream Status: iproute2.git commit 97a02cabefb2e
|
|
|
4aca6e |
|
|
|
4aca6e |
commit 97a02cabefb2e2dcfe27f89943709afa84be5525
|
|
|
4aca6e |
Author: Phil Sutter <phil@nwl.cc>
|
|
|
4aca6e |
Date: Thu Jan 12 15:22:49 2017 +0100
|
|
|
4aca6e |
|
|
|
4aca6e |
tc: m_xt: Fix segfault with iptables-1.6.0
|
|
|
4aca6e |
|
|
|
4aca6e |
Said iptables version introduced struct xtables_globals field
|
|
|
4aca6e |
'compat_rev', a function pointer. Initializing it is mandatory as
|
|
|
4aca6e |
libxtables calls it without existence check.
|
|
|
4aca6e |
|
|
|
4aca6e |
Without this, tc segfaults when using the xt action like so:
|
|
|
4aca6e |
|
|
|
4aca6e |
| tc filter add dev d0 parent ffff: u32 match u32 0 0 \
|
|
|
4aca6e |
| action xt -j MARK --set-mark 20
|
|
|
4aca6e |
|
|
|
4aca6e |
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
|
4aca6e |
---
|
|
|
4aca6e |
tc/m_xt.c | 3 +++
|
|
|
4aca6e |
1 file changed, 3 insertions(+)
|
|
|
4aca6e |
|
|
|
4aca6e |
diff --git a/tc/m_xt.c b/tc/m_xt.c
|
|
|
4aca6e |
index 8317f31..890dddd 100644
|
|
|
4aca6e |
--- a/tc/m_xt.c
|
|
|
4aca6e |
+++ b/tc/m_xt.c
|
|
|
4aca6e |
@@ -77,6 +77,9 @@ static struct xtables_globals tcipt_globals = {
|
|
|
4aca6e |
.orig_opts = original_opts,
|
|
|
4aca6e |
.opts = original_opts,
|
|
|
4aca6e |
.exit_err = NULL,
|
|
|
4aca6e |
+#if (XTABLES_VERSION_CODE >= 11)
|
|
|
4aca6e |
+ .compat_rev = xtables_compatible_revision,
|
|
|
4aca6e |
+#endif
|
|
|
4aca6e |
};
|
|
|
4aca6e |
|
|
|
4aca6e |
/*
|
|
|
4aca6e |
--
|
|
|
4aca6e |
1.8.3.1
|
|
|
4aca6e |
|