]> Pileus Git - ~andy/linux/blobdiff - net/netfilter/xt_u32.c
Pull kvm-patches into release branch
[~andy/linux] / net / netfilter / xt_u32.c
index 3d8f5b3986afea29e5c88642d64ebad2172b3e8e..627e0f336d54b45b84f9417b0757d3320acf86c2 100644 (file)
@@ -26,7 +26,6 @@ static bool u32_match_it(const struct xt_u32 *data,
        u_int32_t pos;
        u_int32_t val;
        u_int32_t at;
-       int ret;
 
        /*
         * Small example: "0 >> 28 == 4 && 8 & 0xFF0000 >> 16 = 6, 17"
@@ -40,8 +39,8 @@ static bool u32_match_it(const struct xt_u32 *data,
                if (skb->len < 4 || pos > skb->len - 4)
                        return false;
 
-               ret   = skb_copy_bits(skb, pos, &n, sizeof(n));
-               BUG_ON(ret < 0);
+               if (skb_copy_bits(skb, pos, &n, sizeof(n)) < 0)
+                       BUG();
                val   = ntohl(n);
                nnums = ct->nnums;
 
@@ -67,9 +66,9 @@ static bool u32_match_it(const struct xt_u32 *data,
                                    pos > skb->len - at - 4)
                                        return false;
 
-                               ret = skb_copy_bits(skb, at + pos, &n,
-                                                   sizeof(n));
-                               BUG_ON(ret < 0);
+                               if (skb_copy_bits(skb, at + pos, &n,
+                                                   sizeof(n)) < 0)
+                                       BUG();
                                val = ntohl(n);
                                break;
                        }
@@ -130,7 +129,7 @@ static void __exit u32_mt_exit(void)
 module_init(u32_mt_init);
 module_exit(u32_mt_exit);
 MODULE_AUTHOR("Jan Engelhardt <jengelh@computergmbh.de>");
-MODULE_DESCRIPTION("netfilter u32 match module");
+MODULE_DESCRIPTION("Xtables: arbitrary byte matching");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("ipt_u32");
 MODULE_ALIAS("ip6t_u32");