return -EINVAL;
mutex_lock(&queue_handler_mutex);
- if (queue_handler[pf] != qh) {
+ if (queue_handler[pf] && queue_handler[pf] != qh) {
mutex_unlock(&queue_handler_mutex);
return -EINVAL;
}
struct net_device *physindev;
struct net_device *physoutdev;
#endif
- struct nf_afinfo *afinfo;
+ const struct nf_afinfo *afinfo;
const struct nf_queue_handler *qh;
/* QUEUE == DROP if noone is waiting, to be safe. */
segs = skb_gso_segment(skb, 0);
kfree_skb(skb);
- if (unlikely(IS_ERR(segs)))
+ if (IS_ERR(segs))
return 1;
do {
{
struct sk_buff *skb = entry->skb;
struct list_head *elem = &entry->elem->list;
- struct nf_afinfo *afinfo;
+ const struct nf_afinfo *afinfo;
rcu_read_lock();
int __init netfilter_queue_init(void)
{
#ifdef CONFIG_PROC_FS
- struct proc_dir_entry *pde;
-
- pde = create_proc_entry("nf_queue", S_IRUGO, proc_net_netfilter);
- if (!pde)
+ if (!proc_create("nf_queue", S_IRUGO,
+ proc_net_netfilter, &nfqueue_file_ops))
return -1;
- pde->proc_fops = &nfqueue_file_ops;
#endif
return 0;
}