]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/netfilter/xt_connbytes.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
[linux-2.6-omap-h63xx.git] / net / netfilter / xt_connbytes.c
index 12541784109a1235396f55bccd0703f3b0bfe37c..9ec50139b9a177d559236790b3f0351c7ba9ef71 100644 (file)
@@ -2,18 +2,19 @@
  * GPL (C) 2002 Martin Devera (devik@cdi.cz).
  */
 #include <linux/module.h>
+#include <linux/bitops.h>
 #include <linux/skbuff.h>
 #include <linux/netfilter/x_tables.h>
 #include <linux/netfilter/xt_connbytes.h>
 #include <net/netfilter/nf_conntrack.h>
 
 #include <asm/div64.h>
-#include <asm/bitops.h>
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");
 MODULE_DESCRIPTION("iptables match for matching number of pkts/bytes per connection");
 MODULE_ALIAS("ipt_connbytes");
+MODULE_ALIAS("ip6t_connbytes");
 
 static bool
 match(const struct sk_buff *skb,
@@ -26,7 +27,7 @@ match(const struct sk_buff *skb,
       bool *hotdrop)
 {
        const struct xt_connbytes_info *sinfo = matchinfo;
-       struct nf_conn *ct;
+       const struct nf_conn *ct;
        enum ip_conntrack_info ctinfo;
        u_int64_t what = 0;     /* initialize to make gcc happy */
        u_int64_t bytes = 0;
@@ -90,9 +91,9 @@ match(const struct sk_buff *skb,
        }
 
        if (sinfo->count.to)
-               return (what <= sinfo->count.to && what >= sinfo->count.from);
+               return what <= sinfo->count.to && what >= sinfo->count.from;
        else
-               return (what >= sinfo->count.from);
+               return what >= sinfo->count.from;
 }
 
 static bool check(const char *tablename,
@@ -128,7 +129,7 @@ destroy(const struct xt_match *match, void *matchinfo)
        nf_ct_l3proto_module_put(match->family);
 }
 
-static struct xt_match xt_connbytes_match[] = {
+static struct xt_match xt_connbytes_match[] __read_mostly = {
        {
                .name           = "connbytes",
                .family         = AF_INET,