From: Florian Westphal Date: Thu, 7 Dec 2017 15:28:27 +0000 (+0100) Subject: netfilter: reduce NF_MAX_HOOKS define X-Git-Tag: v4.19~1702^2~216^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=256d94ba33070564f3e98ded435d917a1bbc5e82;p=platform%2Fkernel%2Flinux-rpi.git netfilter: reduce NF_MAX_HOOKS define This can be same as NF_INET_NUMHOOKS if we don't support DECNET. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- diff --git a/include/linux/netfilter_defs.h b/include/linux/netfilter_defs.h index fdcdf2b..8dddfb1 100644 --- a/include/linux/netfilter_defs.h +++ b/include/linux/netfilter_defs.h @@ -4,13 +4,17 @@ #include -/* 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