Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
[sfrench/cifs-2.6.git] / net / ipv4 / netfilter / ipt_ecn.c
index e68b0c7981f0c7d4594d3e42854914873a43562a..d7e29f6a38d84823cb0f65a8692921f6f642e627 100644 (file)
@@ -65,8 +65,9 @@ static inline int match_tcp(const struct sk_buff *skb,
        return 1;
 }
 
-static int match(const struct sk_buff *skb, const struct net_device *in,
-                const struct net_device *out, const void *matchinfo,
+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, int *hotdrop)
 {
        const struct ipt_ecn_info *info = matchinfo;
@@ -86,15 +87,13 @@ static int match(const struct sk_buff *skb, const struct net_device *in,
 }
 
 static int checkentry(const char *tablename, const void *ip_void,
+                     const struct xt_match *match,
                      void *matchinfo, unsigned int matchsize,
                      unsigned int hook_mask)
 {
        const struct ipt_ecn_info *info = matchinfo;
        const struct ipt_ip *ip = ip_void;
 
-       if (matchsize != IPT_ALIGN(sizeof(struct ipt_ecn_info)))
-               return 0;
-
        if (info->operation & IPT_ECN_OP_MATCH_MASK)
                return 0;
 
@@ -113,8 +112,9 @@ static int checkentry(const char *tablename, const void *ip_void,
 
 static struct ipt_match ecn_match = {
        .name           = "ecn",
-       .match          = &match,
-       .checkentry     = &checkentry,
+       .match          = match,
+       .matchsize      = sizeof(struct ipt_ecn_info),
+       .checkentry     = checkentry,
        .me             = THIS_MODULE,
 };