]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
tc: Fix compilation error with old iptables
authorRoi Dayan <roid@mellanox.com>
Tue, 27 Mar 2018 09:20:48 +0000 (12:20 +0300)
committerDavid Ahern <dsahern@gmail.com>
Tue, 27 Mar 2018 13:38:52 +0000 (06:38 -0700)
The compat_rev field does not exists in old versions of iptables.
e.g. iptables 1.4.

Fixes: dd29621578d2 ("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>
tc/em_ipt.c

index 9d2b2f9b46d47f5ba0b8e5fcbd80a8738ab383e3..aa2edd63c5509aa2689378c2e77d123ec8edd4ed 100644 (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)