summaryrefslogtreecommitdiff
path: root/net/netfilter/nf_queue.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-12-05 01:23:41 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 14:56:08 -0800
commitfb46990dba94866462e90623e183d02ec591cf8f (patch)
tree00d0529ce32d3fabeaba09a9b29fd3a22c06aaf1 /net/netfilter/nf_queue.c
parent8b1cf0db2aced837fcd50072e81e32c5836a1ee1 (diff)
[NETFILTER]: nf_queue: remove unnecessary hook existance check
We hold a module reference for each queued packet, so the hook that queued the packet can't disappear. Also remove an obsolete comment stating the opposite. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/nf_queue.c')
-rw-r--r--net/netfilter/nf_queue.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c
index 81d010a05b98..0bea88c30e51 100644
--- a/net/netfilter/nf_queue.c
+++ b/net/netfilter/nf_queue.c
@@ -223,7 +223,6 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info,
unsigned int verdict)
{
struct list_head *elem = &info->elem->list;
- struct list_head *i;
struct nf_afinfo *afinfo;
rcu_read_lock();
@@ -245,18 +244,6 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info,
/* Drop reference to owner of hook which queued us. */
module_put(info->elem->owner);
- list_for_each_rcu(i, &nf_hooks[info->pf][info->hook]) {
- if (i == elem)
- break;
- }
-
- if (i == &nf_hooks[info->pf][info->hook]) {
- /* The module which sent it to userspace is gone. */
- NFDEBUG("%s: module disappeared, dropping packet.\n",
- __FUNCTION__);
- verdict = NF_DROP;
- }
-
/* Continue traversal iff userspace said ok... */
if (verdict == NF_REPEAT) {
elem = elem->prev;