Skip to content

Commit

Permalink
netfilter: reduce NF_MAX_HOOKS define
Browse files Browse the repository at this point in the history
This can be same as NF_INET_NUMHOOKS if we don't support DECNET.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Florian Westphal authored and Pablo Neira Ayuso committed Jan 8, 2018
1 parent 2a95183 commit 256d94b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions include/linux/netfilter_defs.h
Original file line number Diff line number Diff line change
@@ -4,13 +4,17 @@

#include <uapi/linux/netfilter.h>

/* Largest hook number + 1, see uapi/linux/netfilter_decnet.h */
#define NF_MAX_HOOKS 8

/* in/out/forward only */
#define NF_ARP_NUMHOOKS 3

/* max hook is NF_DN_ROUTE (6), also see uapi/linux/netfilter_decnet.h */
#define NF_DN_NUMHOOKS 7

#if IS_ENABLED(CONFIG_DECNET)
/* Largest hook number + 1, see uapi/linux/netfilter_decnet.h */
#define NF_MAX_HOOKS NF_DN_NUMHOOKS
#else
#define NF_MAX_HOOKS NF_INET_NUMHOOKS
#endif

#endif

0 comments on commit 256d94b

Please sign in to comment.