]> err.no Git - linux-2.6/blobdiff - net/netfilter/nf_queue.c
Merge branch 'x86/fixmap' into x86/devel
[linux-2.6] / net / netfilter / nf_queue.c
index 77965114b091a899ff43e7d6df81ca378abf50f1..582ec3efc8a55f32603feeca879a8267a2639d6b 100644 (file)
@@ -51,7 +51,7 @@ int nf_unregister_queue_handler(int pf, const struct nf_queue_handler *qh)
                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;
        }
@@ -119,7 +119,7 @@ static int __nf_queue(struct sk_buff *skb,
        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. */
@@ -214,7 +214,7 @@ int nf_queue(struct sk_buff *skb,
 
        segs = skb_gso_segment(skb, 0);
        kfree_skb(skb);
-       if (unlikely(IS_ERR(segs)))
+       if (IS_ERR(segs))
                return 1;
 
        do {
@@ -233,7 +233,7 @@ void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict)
 {
        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();
 
@@ -348,12 +348,9 @@ static const struct file_operations nfqueue_file_ops = {
 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;
 }