]> err.no Git - linux-2.6/blobdiff - net/netfilter/xt_connbytes.c
[NETFILTER]: ctnetlink: Fix expectaction mask dumping
[linux-2.6] / net / netfilter / xt_connbytes.c
index 150d2a4b0f71059edaad4a8995a794f7fe456030..f34ecb9485c7f820047b8ac9d5207a0a2676cc30 100644 (file)
@@ -44,6 +44,7 @@ static int
 match(const struct sk_buff *skb,
       const struct net_device *in,
       const struct net_device *out,
+      const struct xt_match *match,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
@@ -122,15 +123,13 @@ match(const struct sk_buff *skb,
 
 static int check(const char *tablename,
                 const void *ip,
+                const struct xt_match *match,
                 void *matchinfo,
                 unsigned int matchsize,
                 unsigned int hook_mask)
 {
        const struct xt_connbytes_info *sinfo = matchinfo;
 
-       if (matchsize != XT_ALIGN(sizeof(struct xt_connbytes_info)))
-               return 0;
-
        if (sinfo->what != XT_CONNBYTES_PKTS &&
            sinfo->what != XT_CONNBYTES_BYTES &&
            sinfo->what != XT_CONNBYTES_AVGPKT)
@@ -146,14 +145,16 @@ static int check(const char *tablename,
 
 static struct xt_match connbytes_match = {
        .name           = "connbytes",
-       .match          = &match,
-       .checkentry     = &check,
+       .match          = match,
+       .checkentry     = check,
+       .matchsize      = sizeof(struct xt_connbytes_info),
        .me             = THIS_MODULE
 };
 static struct xt_match connbytes6_match = {
        .name           = "connbytes",
-       .match          = &match,
-       .checkentry     = &check,
+       .match          = match,
+       .checkentry     = check,
+       .matchsize      = sizeof(struct xt_connbytes_info),
        .me             = THIS_MODULE
 };