[NETFILTER]: Fix whitespace errors
[safe/jmp/linux-2.6] / net / netfilter / xt_hashlimit.c
index 46de566..9f37d59 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/seq_file.h>
 #include <linux/list.h>
 #include <linux/skbuff.h>
+#include <linux/mm.h>
 #include <linux/in.h>
 #include <linux/ip.h>
 #include <linux/ipv6.h>
@@ -36,7 +37,7 @@ MODULE_ALIAS("ip6t_hashlimit");
 /* need to declare this at the top */
 static struct proc_dir_entry *hashlimit_procdir4;
 static struct proc_dir_entry *hashlimit_procdir6;
-static struct file_operations dl_file_ops;
+static const struct file_operations dl_file_ops;
 
 /* hash table crap */
 struct dsthash_dst {
@@ -91,7 +92,7 @@ struct xt_hashlimit_htable {
 static DEFINE_SPINLOCK(hashlimit_lock);        /* protects htables list */
 static DEFINE_MUTEX(hlimit_mutex);     /* additional checkentry protection */
 static HLIST_HEAD(hashlimit_htables);
-static kmem_cache_t *hashlimit_cachep __read_mostly;
+static struct kmem_cache *hashlimit_cachep __read_mostly;
 
 static inline int dst_cmp(const struct dsthash_ent *ent, struct dsthash_dst *b)
 {
@@ -207,7 +208,7 @@ static int htable_create(struct xt_hashlimit_info *minfo, int family)
        spin_lock_init(&hinfo->lock);
        hinfo->pde = create_proc_entry(minfo->name, 0,
                                       family == AF_INET ? hashlimit_procdir4 :
-                                                          hashlimit_procdir6);
+                                                          hashlimit_procdir6);
        if (!hinfo->pde) {
                vfree(hinfo);
                return -1;
@@ -239,7 +240,7 @@ static int select_gc(struct xt_hashlimit_htable *ht, struct dsthash_ent *he)
 }
 
 static void htable_selective_cleanup(struct xt_hashlimit_htable *ht,
-                               int (*select)(struct xt_hashlimit_htable *ht,
+                               int (*select)(struct xt_hashlimit_htable *ht,
                                              struct dsthash_ent *he))
 {
        unsigned int i;
@@ -278,7 +279,7 @@ static void htable_destroy(struct xt_hashlimit_htable *hinfo)
        /* remove proc entry */
        remove_proc_entry(hinfo->pde->name,
                          hinfo->family == AF_INET ? hashlimit_procdir4 :
-                                                    hashlimit_procdir6);
+                                                    hashlimit_procdir6);
        htable_selective_cleanup(hinfo, select_all);
        vfree(hinfo);
 }
@@ -388,7 +389,7 @@ hashlimit_init_dst(struct xt_hashlimit_htable *hinfo, struct dsthash_dst *dst,
                        return 0;
                nexthdr = skb->nh.iph->protocol;
                break;
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
        case AF_INET6:
                if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_DIP)
                        memcpy(&dst->addr.ip6.dst, &skb->nh.ipv6h->daddr,
@@ -413,6 +414,7 @@ hashlimit_init_dst(struct xt_hashlimit_htable *hinfo, struct dsthash_dst *dst,
        switch (nexthdr) {
        case IPPROTO_TCP:
        case IPPROTO_UDP:
+       case IPPROTO_UDPLITE:
        case IPPROTO_SCTP:
        case IPPROTO_DCCP:
                ports = skb_header_pointer(skb, protoff, sizeof(_ports),
@@ -481,7 +483,7 @@ hashlimit_match(const struct sk_buff *skb,
                return 1;
        }
 
-               spin_unlock_bh(&hinfo->lock);
+       spin_unlock_bh(&hinfo->lock);
 
        /* default case: we're overlimit, thus don't match */
        return 0;
@@ -712,7 +714,7 @@ static int dl_proc_open(struct inode *inode, struct file *file)
        return ret;
 }
 
-static struct file_operations dl_file_ops = {
+static const struct file_operations dl_file_ops = {
        .owner   = THIS_MODULE,
        .open    = dl_proc_open,
        .read    = seq_read,
@@ -744,7 +746,7 @@ static int __init xt_hashlimit_init(void)
        }
        hashlimit_procdir6 = proc_mkdir("ip6t_hashlimit", proc_net);
        if (!hashlimit_procdir6) {
-               printk(KERN_ERR "xt_hashlimit: tnable to create proc dir "
+               printk(KERN_ERR "xt_hashlimit: unable to create proc dir "
                                "entry\n");
                goto err4;
        }