summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-04-27 13:47:01 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2018-05-07 00:35:10 +0300
commit3f9c56a581b96d8117922c4fd8221687fd649f9b (patch)
tree5e1e5e5b03bae1a3e1b82577328ea2d16f1429d5 /include/uapi
parent3a2e86f64577be9a6e2c13ee06834e769cd3824f (diff)
downloadlinux-3f9c56a581b96d8117922c4fd8221687fd649f9b.tar.xz
netfilter: nf_tables: Provide NFT_{RT,CT}_MAX for userspace
These macros allow conveniently declaring arrays which use NFT_{RT,CT}_* values as indexes. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index 5a5551a580f7..ce031cf72288 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -831,7 +831,9 @@ enum nft_rt_keys {
NFT_RT_NEXTHOP4,
NFT_RT_NEXTHOP6,
NFT_RT_TCPMSS,
+ __NFT_RT_MAX
};
+#define NFT_RT_MAX (__NFT_RT_MAX - 1)
/**
* enum nft_hash_types - nf_tables hash expression types
@@ -949,7 +951,9 @@ enum nft_ct_keys {
NFT_CT_DST_IP,
NFT_CT_SRC_IP6,
NFT_CT_DST_IP6,
+ __NFT_CT_MAX
};
+#define NFT_CT_MAX (__NFT_CT_MAX - 1)
/**
* enum nft_ct_attributes - nf_tables ct expression netlink attributes