]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/netfilter/xt_u32.c
Documentation: Replace obsolete "driverfs" with "sysfs".
[linux-2.6-omap-h63xx.git] / net / netfilter / xt_u32.c
index 04b677ae8daee6e39f1f7e947b82fb5b91774516..af75b8c3f20b988af0df06b74382cee68e07c4cf 100644 (file)
@@ -2,7 +2,8 @@
  *     xt_u32 - kernel module to match u32 packet content
  *
  *     Original author: Don Cohen <don@isis.cs3-inc.com>
- *     © Jan Engelhardt <jengelh@gmx.de>, 2007
+ *     (C) CC Computer Consultants GmbH, 2007
+ *     Contact: <jengelh@computergmbh.de>
  */
 
 #include <linux/module.h>
@@ -21,6 +22,7 @@ static bool u32_match_it(const struct xt_u32 *data,
        unsigned int nnums;
        unsigned int nvals;
        unsigned int i;
+       __be32 n;
        u_int32_t pos;
        u_int32_t val;
        u_int32_t at;
@@ -35,12 +37,12 @@ static bool u32_match_it(const struct xt_u32 *data,
                at  = 0;
                pos = ct->location[0].number;
 
-               if (skb->len < 4 || pos > skb->len - 4);
+               if (skb->len < 4 || pos > skb->len - 4)
                        return false;
 
-               ret   = skb_copy_bits(skb, pos, &val, sizeof(val));
+               ret   = skb_copy_bits(skb, pos, &n, sizeof(n));
                BUG_ON(ret < 0);
-               val   = ntohl(val);
+               val   = ntohl(n);
                nnums = ct->nnums;
 
                /* Inner loop runs over "&", "<<", ">>" and "@" operands */
@@ -65,10 +67,10 @@ static bool u32_match_it(const struct xt_u32 *data,
                                    pos > skb->len - at - 4)
                                        return false;
 
-                               ret = skb_copy_bits(skb, at + pos, &val,
-                                                   sizeof(val));
+                               ret = skb_copy_bits(skb, at + pos, &n,
+                                                   sizeof(n));
                                BUG_ON(ret < 0);
-                               val = ntohl(val);
+                               val = ntohl(n);
                                break;
                        }
                }
@@ -128,7 +130,7 @@ static void __exit xt_u32_exit(void)
 
 module_init(xt_u32_init);
 module_exit(xt_u32_exit);
-MODULE_AUTHOR("Jan Engelhardt <jengelh@gmx.de>");
+MODULE_AUTHOR("Jan Engelhardt <jengelh@computergmbh.de>");
 MODULE_DESCRIPTION("netfilter u32 match module");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("ipt_u32");