Skip to content

Commit aa992c6

Browse files
a3a3elgregkh
authored andcommitted
netfilter: add missing IS_ENABLED(CONFIG_NF_TABLES) check to header-file.
commit 47e640a upstream. nf_tables.h defines an API comprising several inline functions and macros that depend on the nft member of struct net. However, this is only defined is CONFIG_NF_TABLES is enabled. Added preprocessor checks to ensure that nf_tables.h will compile if CONFIG_NF_TABLES is disabled. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Link: https://lore.kernel.org/netfilter-devel/20190920094925.aw7actk4tdnk3rke@salvia/T/ Fixes: 3c171f4 ("netfilter: bridge: add connection tracking system") Reported-by: Adam Borowski <kilobyte@angband.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c9a59a8 commit aa992c6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎include/net/netfilter/nf_tables.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,8 @@ void nft_trace_notify(struct nft_traceinfo *info);
12061206
#define MODULE_ALIAS_NFT_OBJ(type) \
12071207
MODULE_ALIAS("nft-obj-" __stringify(type))
12081208

1209+
#if IS_ENABLED(CONFIG_NF_TABLES)
1210+
12091211
/*
12101212
* The gencursor defines two generations, the currently active and the
12111213
* next one. Objects contain a bitmask of 2 bits specifying the generations
@@ -1279,6 +1281,8 @@ static inline void nft_set_elem_change_active(const struct net *net,
12791281
ext->genmask ^= nft_genmask_next(net);
12801282
}
12811283

1284+
#endif /* IS_ENABLED(CONFIG_NF_TABLES) */
1285+
12821286
/*
12831287
* We use a free bit in the genmask field to indicate the element
12841288
* is busy, meaning it is currently being processed either by

0 commit comments

Comments
 (0)