tc: Fix compilation error with old iptables

The compat_rev field does not exists in old versions of iptables.
e.g. iptables 1.4.

Fixes: dd29621578 ("tc: add em_ipt ematch for calling xtables matches from tc matching context")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
Roi Dayan 2018-03-27 12:20:48 +03:00 committed by David Ahern
parent 2c6962cfaf
commit 17504be81d
1 changed files with 2 additions and 0 deletions

View File

@ -41,7 +41,9 @@ static struct xtables_globals em_tc_ipt_globals = {
.program_version = "0.1",
.orig_opts = original_opts,
.opts = original_opts,
#if (XTABLES_VERSION_CODE >= 11)
.compat_rev = xtables_compatible_revision,
#endif
};
static struct xt_entry_match *fake_xt_entry_match(int data_size, void *data)