netfilter: remove CONFIG_NETFILTER checks from headers.
`struct nf_hook_ops`, `struct nf_hook_state` and the `nf_hookfn` function typedef appear in function and struct declarations and definitions in a number of netfilter headers. The structs and typedef themselves are defined by linux/netfilter.h but only when CONFIG_NETFILTER is enabled. Define them unconditionally and add forward declarations in order to remove CONFIG_NETFILTER conditionals from the other headers. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
committed by
Pablo Neira Ayuso
parent
51a21be42a
commit
f19438bdd4
@@ -15,7 +15,6 @@
|
||||
#include <linux/netdevice.h>
|
||||
#include <net/net_namespace.h>
|
||||
|
||||
#ifdef CONFIG_NETFILTER
|
||||
static inline int NF_DROP_GETERR(int verdict)
|
||||
{
|
||||
return -(verdict >> NF_VERDICT_QBITS);
|
||||
@@ -118,6 +117,7 @@ struct nf_hook_entries {
|
||||
*/
|
||||
};
|
||||
|
||||
#ifdef CONFIG_NETFILTER
|
||||
static inline struct nf_hook_ops **nf_hook_entries_get_hook_ops(const struct nf_hook_entries *e)
|
||||
{
|
||||
unsigned int n = e->num_hook_entries;
|
||||
|
||||
Reference in New Issue
Block a user