static LIST_HEAD(queue_list);
static DEFINE_MUTEX(ipqnl_mutex);
-static void
-ipq_issue_verdict(struct nf_queue_entry *entry, int verdict)
-{
- /* TCP input path (and probably other bits) assume to be called
- * from softirq context, not from syscall, like ipq_issue_verdict is
- * called. TCP input path deadlocks with locks taken from timer
- * softirq, e.g. We therefore emulate this by local_bh_disable() */
-
- local_bh_disable();
- nf_reinject(entry, verdict);
- local_bh_enable();
-}
-
static inline void
__ipq_enqueue_entry(struct nf_queue_entry *entry)
{
if (!cmpfn || cmpfn(entry, data)) {
list_del(&entry->list);
queue_total--;
- ipq_issue_verdict(entry, NF_DROP);
+ nf_reinject(entry, NF_DROP);
}
}
}
if (ipq_mangle_ipv4(vmsg, entry) < 0)
verdict = NF_DROP;
- ipq_issue_verdict(entry, verdict);
+ nf_reinject(entry, verdict);
return 0;
}
}
static LIST_HEAD(queue_list);
static DEFINE_MUTEX(ipqnl_mutex);
-static void
-ipq_issue_verdict(struct nf_queue_entry *entry, int verdict)
-{
- local_bh_disable();
- nf_reinject(entry, verdict);
- local_bh_enable();
-}
-
static inline void
__ipq_enqueue_entry(struct nf_queue_entry *entry)
{
if (!cmpfn || cmpfn(entry, data)) {
list_del(&entry->list);
queue_total--;
- ipq_issue_verdict(entry, NF_DROP);
+ nf_reinject(entry, NF_DROP);
}
}
}
if (ipq_mangle_ipv6(vmsg, entry) < 0)
verdict = NF_DROP;
- ipq_issue_verdict(entry, verdict);
+ nf_reinject(entry, verdict);
return 0;
}
}
switch (verdict & NF_VERDICT_MASK) {
case NF_ACCEPT:
case NF_STOP:
+ local_bh_disable();
entry->okfn(skb);
+ local_bh_enable();
case NF_STOLEN:
break;
case NF_QUEUE:
_instance_destroy2(inst, 1);
}
-
-
-static void
-issue_verdict(struct nf_queue_entry *entry, int verdict)
-{
- QDEBUG("entering for entry %p, verdict %u\n", entry, verdict);
-
- /* TCP input path (and probably other bits) assume to be called
- * from softirq context, not from syscall, like issue_verdict is
- * called. TCP input path deadlocks with locks taken from timer
- * softirq, e.g. We therefore emulate this by local_bh_disable() */
-
- local_bh_disable();
- nf_reinject(entry, verdict);
- local_bh_enable();
-}
-
static inline void
__enqueue_entry(struct nfqnl_instance *queue, struct nf_queue_entry *entry)
{
if (!cmpfn || cmpfn(entry, data)) {
list_del(&entry->list);
queue->queue_total--;
- issue_verdict(entry, NF_DROP);
+ nf_reinject(entry, NF_DROP);
}
}
spin_unlock_bh(&queue->lock);
entry->skb->mark = ntohl(*(__be32 *)
nla_data(nfqa[NFQA_MARK]));
- issue_verdict(entry, verdict);
+ nf_reinject(entry, verdict);
instance_put(queue);
return 0;