summaryrefslogtreecommitdiffstats
path: root/include/libnftnl/set.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2014-02-25 22:27:12 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2014-02-27 10:35:07 +0100
commit41175cec8407da4687493a9f74043656682d470a (patch)
tree0480536d5861270c83edc43908cc9abe5da6eb69 /include/libnftnl/set.h
parent19c3da8e70d32818b7267fc63b44441295e69567 (diff)
src: early attribute type validation in nft_*_attr_set
This allows us to remove the default case in the switch, which show help to spot missing attribute support since gcc will spot a compilation warning. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/libnftnl/set.h')
-rw-r--r--include/libnftnl/set.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libnftnl/set.h b/include/libnftnl/set.h
index 7fa9fb2..ba11315 100644
--- a/include/libnftnl/set.h
+++ b/include/libnftnl/set.h
@@ -17,7 +17,9 @@ enum {
NFT_SET_ATTR_DATA_TYPE,
NFT_SET_ATTR_DATA_LEN,
NFT_SET_ATTR_FAMILY,
+ __NFT_SET_ATTR_MAX
};
+#define NFT_SET_ATTR_MAX (__NFT_SET_ATTR_MAX - 1)
struct nft_set;