aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netfilter.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2015-07-20 13:32:52 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2015-07-23 16:18:35 +0200
commit3bbd14e0a2e3a988b1b5fe702a2539bd8d0ec622 (patch)
tree6008f42f68ef6ba5a0fcaef9a5b079681205df27 /include/linux/netfilter.h
parentnetfilter: fix possible removal of wrong hook (diff)
downloadlinux-dev-3bbd14e0a2e3a988b1b5fe702a2539bd8d0ec622.tar.xz
linux-dev-3bbd14e0a2e3a988b1b5fe702a2539bd8d0ec622.zip
netfilter: rename local nf_hook_list to hook_list
085db2c04557 ("netfilter: Per network namespace netfilter hooks.") introduced a new nf_hook_list that is global, so let's avoid this overlap. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'include/linux/netfilter.h')
-rw-r--r--include/linux/netfilter.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index e01da73ee6c4..d788ce62d826 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -140,20 +140,20 @@ void nf_unregister_sockopt(struct nf_sockopt_ops *reg);
#ifdef HAVE_JUMP_LABEL
extern struct static_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS];
-static inline bool nf_hook_list_active(struct list_head *nf_hook_list,
+static inline bool nf_hook_list_active(struct list_head *hook_list,
u_int8_t pf, unsigned int hook)
{
if (__builtin_constant_p(pf) &&
__builtin_constant_p(hook))
return static_key_false(&nf_hooks_needed[pf][hook]);
- return !list_empty(nf_hook_list);
+ return !list_empty(hook_list);
}
#else
-static inline bool nf_hook_list_active(struct list_head *nf_hook_list,
+static inline bool nf_hook_list_active(struct list_head *hook_list,
u_int8_t pf, unsigned int hook)
{
- return !list_empty(nf_hook_list);
+ return !list_empty(hook_list);
}
#endif
@@ -175,12 +175,12 @@ static inline int nf_hook_thresh(u_int8_t pf, unsigned int hook,
int thresh)
{
struct net *net = dev_net(indev ? indev : outdev);
- struct list_head *nf_hook_list = &net->nf.hooks[pf][hook];
+ struct list_head *hook_list = &net->nf.hooks[pf][hook];
- if (nf_hook_list_active(nf_hook_list, pf, hook)) {
+ if (nf_hook_list_active(hook_list, pf, hook)) {
struct nf_hook_state state;
- nf_hook_state_init(&state, nf_hook_list, hook, thresh,
+ nf_hook_state_init(&state, hook_list, hook, thresh,
pf, indev, outdev, sk, okfn);
return nf_hook_slow(skb, &state);
}