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>
This commit is contained in:
Phil Sutter 2017-01-12 15:22:49 +01:00 committed by Stephen Hemminger
parent 3bad1dbb20
commit 97a02cabef
1 changed files with 3 additions and 0 deletions

View File

@ -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
};
/*