]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/netfilter/xt_connmark.c
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mv-sheeva.git] / net / netfilter / xt_connmark.c
index df4f4a865a5e4aabb36ba8e61d1a0504734e6046..86cacab7a4a34ff519161f3c5388c78744956f00 100644 (file)
@@ -61,42 +61,35 @@ connmark_mt_v0(const struct sk_buff *skb, const struct xt_match_param *par)
        return ((ct->mark & info->mask) == info->mark) ^ info->invert;
 }
 
-static bool
-connmark_mt_check_v0(const char *tablename, const void *ip,
-                     const struct xt_match *match, void *matchinfo,
-                     unsigned int hook_mask)
+static bool connmark_mt_check_v0(const struct xt_mtchk_param *par)
 {
-       const struct xt_connmark_info *cm = matchinfo;
+       const struct xt_connmark_info *cm = par->matchinfo;
 
        if (cm->mark > 0xffffffff || cm->mask > 0xffffffff) {
                printk(KERN_WARNING "connmark: only support 32bit mark\n");
                return false;
        }
-       if (nf_ct_l3proto_try_module_get(match->family) < 0) {
+       if (nf_ct_l3proto_try_module_get(par->family) < 0) {
                printk(KERN_WARNING "can't load conntrack support for "
-                                   "proto=%u\n", match->family);
+                                   "proto=%u\n", par->family);
                return false;
        }
        return true;
 }
 
-static bool
-connmark_mt_check(const char *tablename, const void *ip,
-                  const struct xt_match *match, void *matchinfo,
-                  unsigned int hook_mask)
+static bool connmark_mt_check(const struct xt_mtchk_param *par)
 {
-       if (nf_ct_l3proto_try_module_get(match->family) < 0) {
+       if (nf_ct_l3proto_try_module_get(par->family) < 0) {
                printk(KERN_WARNING "cannot load conntrack support for "
-                      "proto=%u\n", match->family);
+                      "proto=%u\n", par->family);
                return false;
        }
        return true;
 }
 
-static void
-connmark_mt_destroy(const struct xt_match *match, void *matchinfo)
+static void connmark_mt_destroy(const struct xt_mtdtor_param *par)
 {
-       nf_ct_l3proto_module_put(match->family);
+       nf_ct_l3proto_module_put(par->family);
 }
 
 #ifdef CONFIG_COMPAT
@@ -134,7 +127,7 @@ static struct xt_match connmark_mt_reg[] __read_mostly = {
        {
                .name           = "connmark",
                .revision       = 0,
-               .family         = NFPROTO_IPV4,
+               .family         = NFPROTO_UNSPEC,
                .checkentry     = connmark_mt_check_v0,
                .match          = connmark_mt_v0,
                .destroy        = connmark_mt_destroy,
@@ -146,35 +139,10 @@ static struct xt_match connmark_mt_reg[] __read_mostly = {
 #endif
                .me             = THIS_MODULE
        },
-       {
-               .name           = "connmark",
-               .revision       = 0,
-               .family         = NFPROTO_IPV6,
-               .checkentry     = connmark_mt_check_v0,
-               .match          = connmark_mt_v0,
-               .destroy        = connmark_mt_destroy,
-               .matchsize      = sizeof(struct xt_connmark_info),
-#ifdef CONFIG_COMPAT
-               .compatsize     = sizeof(struct compat_xt_connmark_info),
-               .compat_from_user = connmark_mt_compat_from_user_v0,
-               .compat_to_user = connmark_mt_compat_to_user_v0,
-#endif
-               .me             = THIS_MODULE
-       },
-       {
-               .name           = "connmark",
-               .revision       = 1,
-               .family         = NFPROTO_IPV4,
-               .checkentry     = connmark_mt_check,
-               .match          = connmark_mt,
-               .matchsize      = sizeof(struct xt_connmark_mtinfo1),
-               .destroy        = connmark_mt_destroy,
-               .me             = THIS_MODULE,
-       },
        {
                .name           = "connmark",
                .revision       = 1,
-               .family         = NFPROTO_IPV6,
+               .family         = NFPROTO_UNSPEC,
                .checkentry     = connmark_mt_check,
                .match          = connmark_mt,
                .matchsize      = sizeof(struct xt_connmark_mtinfo1),