diff options
author | Florian Westphal <fw@strlen.de> | 2015-10-13 14:33:27 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-10-16 18:22:23 +0200 |
commit | ed78d09d59ba9764b7454e8e1ccbb0072a55b6d7 (patch) | |
tree | 1971277eedd1743779e29f66a1ddb741976bec27 /net/netfilter/nf_queue.c | |
parent | 2ffbceb2b08f8ca0496c54a9ebcd11d25275954e (diff) | |
download | linux-stable-ed78d09d59ba9764b7454e8e1ccbb0072a55b6d7.tar.gz linux-stable-ed78d09d59ba9764b7454e8e1ccbb0072a55b6d7.tar.bz2 linux-stable-ed78d09d59ba9764b7454e8e1ccbb0072a55b6d7.zip |
netfilter: make nf_queue_entry_get_refs return void
We don't care if module is being unloaded anymore since hook unregister
handling will destroy queue entries using that hook.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_queue.c')
-rw-r--r-- | net/netfilter/nf_queue.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index eef1c50e0e21..efc968807199 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c @@ -73,7 +73,7 @@ void nf_queue_entry_release_refs(struct nf_queue_entry *entry) EXPORT_SYMBOL_GPL(nf_queue_entry_release_refs); /* Bump dev refs so they don't vanish while packet is out */ -bool nf_queue_entry_get_refs(struct nf_queue_entry *entry) +void nf_queue_entry_get_refs(struct nf_queue_entry *entry) { struct nf_hook_state *state = &entry->state; @@ -95,8 +95,6 @@ bool nf_queue_entry_get_refs(struct nf_queue_entry *entry) dev_hold(physdev); } #endif - - return true; } EXPORT_SYMBOL_GPL(nf_queue_entry_get_refs); @@ -151,10 +149,7 @@ int nf_queue(struct sk_buff *skb, .size = sizeof(*entry) + afinfo->route_key_size, }; - if (!nf_queue_entry_get_refs(entry)) { - status = -ECANCELED; - goto err_unlock; - } + nf_queue_entry_get_refs(entry); skb_dst_force(skb); afinfo->saveroute(skb, entry); status = qh->outfn(entry, queuenum); @@ -215,8 +210,6 @@ void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict) err = nf_queue(skb, elem, &entry->state, verdict >> NF_VERDICT_QBITS); if (err < 0) { - if (err == -ECANCELED) - goto next_hook; if (err == -ESRCH && (verdict & NF_VERDICT_FLAG_QUEUE_BYPASS)) goto next_hook; |