diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-03-20 18:10:29 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-04-06 18:32:04 +0200 |
commit | f323d9546927a012cafbb7e503e6aa0e9fbff94b (patch) | |
tree | 1cb2b3b4467a79db9f3ba9d330d48b0afce6705d /include/net | |
parent | 6f14f443d3e773439fb9cc6f2685ba90d5d026c5 (diff) | |
download | linux-stable-f323d9546927a012cafbb7e503e6aa0e9fbff94b.tar.gz linux-stable-f323d9546927a012cafbb7e503e6aa0e9fbff94b.tar.bz2 linux-stable-f323d9546927a012cafbb7e503e6aa0e9fbff94b.zip |
netfilter: nf_tables: add nft_is_base_chain() helper
This new helper function allows us to check if this is a basechain.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/netfilter/nf_tables.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index f713a053f89d..028faec8fc27 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -911,6 +911,11 @@ static inline struct nft_base_chain *nft_base_chain(const struct nft_chain *chai return container_of(chain, struct nft_base_chain, chain); } +static inline bool nft_is_base_chain(const struct nft_chain *chain) +{ + return chain->flags & NFT_BASE_CHAIN; +} + int __nft_release_basechain(struct nft_ctx *ctx); unsigned int nft_do_chain(struct nft_pktinfo *pkt, void *priv); |