diff options
| author | Zhouyi Zhou <zhouzhouyi@gmail.com> | 2014-08-21 22:40:15 -0400 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-08-25 04:45:28 -0400 |
| commit | d1c85c2ebe7ffe1f1b27846bd1ba0944c513d822 (patch) | |
| tree | 453ec7871afc5de44b46fb3be68967d5f000133d /include/linux | |
| parent | 1e8430f30b55a1f3f6925c9f37f8cc9afd141d2e (diff) | |
netfilter: HAVE_JUMP_LABEL instead of CONFIG_JUMP_LABEL
Use HAVE_JUMP_LABEL as elsewhere in the kernel to ensure
that the toolchain has the required support in addition to
CONFIG_JUMP_LABEL being set.
Signed-off-by: Zhouyi Zhou <yizhouzhou@ict.ac.cn>
Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/netfilter.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 2077489f9887..2517ece98820 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <linux/in6.h> | 9 | #include <linux/in6.h> |
| 10 | #include <linux/wait.h> | 10 | #include <linux/wait.h> |
| 11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
| 12 | #include <linux/static_key.h> | ||
| 12 | #include <uapi/linux/netfilter.h> | 13 | #include <uapi/linux/netfilter.h> |
| 13 | #ifdef CONFIG_NETFILTER | 14 | #ifdef CONFIG_NETFILTER |
| 14 | static inline int NF_DROP_GETERR(int verdict) | 15 | static inline int NF_DROP_GETERR(int verdict) |
| @@ -99,9 +100,9 @@ void nf_unregister_sockopt(struct nf_sockopt_ops *reg); | |||
| 99 | 100 | ||
| 100 | extern struct list_head nf_hooks[NFPROTO_NUMPROTO][NF_MAX_HOOKS]; | 101 | extern struct list_head nf_hooks[NFPROTO_NUMPROTO][NF_MAX_HOOKS]; |
| 101 | 102 | ||
| 102 | #if defined(CONFIG_JUMP_LABEL) | 103 | #ifdef HAVE_JUMP_LABEL |
| 103 | #include <linux/static_key.h> | ||
| 104 | extern struct static_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS]; | 104 | extern struct static_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS]; |
| 105 | |||
| 105 | static inline bool nf_hooks_active(u_int8_t pf, unsigned int hook) | 106 | static inline bool nf_hooks_active(u_int8_t pf, unsigned int hook) |
| 106 | { | 107 | { |
| 107 | if (__builtin_constant_p(pf) && | 108 | if (__builtin_constant_p(pf) && |
