Inconsistent setattr behaviour
[safe/jmp/linux-2.6] / net / netfilter / xt_MARK.c
index 27d03f3..67574bc 100644 (file)
@@ -66,12 +66,9 @@ mark_tg(struct sk_buff *skb, const struct xt_target_param *par)
        return XT_CONTINUE;
 }
 
-static bool
-mark_tg_check_v0(const char *tablename, const void *entry,
-                 const struct xt_target *target, void *targinfo,
-                 unsigned int hook_mask)
+static bool mark_tg_check_v0(const struct xt_tgchk_param *par)
 {
-       const struct xt_mark_target_info *markinfo = targinfo;
+       const struct xt_mark_target_info *markinfo = par->targinfo;
 
        if (markinfo->mark > 0xffffffff) {
                printk(KERN_WARNING "MARK: Only supports 32bit wide mark\n");
@@ -80,12 +77,9 @@ mark_tg_check_v0(const char *tablename, const void *entry,
        return true;
 }
 
-static bool
-mark_tg_check_v1(const char *tablename, const void *entry,
-                 const struct xt_target *target, void *targinfo,
-                 unsigned int hook_mask)
+static bool mark_tg_check_v1(const struct xt_tgchk_param *par)
 {
-       const struct xt_mark_target_info_v1 *markinfo = targinfo;
+       const struct xt_mark_target_info_v1 *markinfo = par->targinfo;
 
        if (markinfo->mode != XT_MARK_SET
            && markinfo->mode != XT_MARK_AND
@@ -155,37 +149,7 @@ static int mark_tg_compat_to_user_v1(void __user *dst, void *src)
 static struct xt_target mark_tg_reg[] __read_mostly = {
        {
                .name           = "MARK",
-               .family         = NFPROTO_IPV4,
-               .revision       = 0,
-               .checkentry     = mark_tg_check_v0,
-               .target         = mark_tg_v0,
-               .targetsize     = sizeof(struct xt_mark_target_info),
-#ifdef CONFIG_COMPAT
-               .compatsize     = sizeof(struct compat_xt_mark_target_info),
-               .compat_from_user = mark_tg_compat_from_user_v0,
-               .compat_to_user = mark_tg_compat_to_user_v0,
-#endif
-               .table          = "mangle",
-               .me             = THIS_MODULE,
-       },
-       {
-               .name           = "MARK",
-               .family         = NFPROTO_IPV4,
-               .revision       = 1,
-               .checkentry     = mark_tg_check_v1,
-               .target         = mark_tg_v1,
-               .targetsize     = sizeof(struct xt_mark_target_info_v1),
-#ifdef CONFIG_COMPAT
-               .compatsize     = sizeof(struct compat_xt_mark_target_info_v1),
-               .compat_from_user = mark_tg_compat_from_user_v1,
-               .compat_to_user = mark_tg_compat_to_user_v1,
-#endif
-               .table          = "mangle",
-               .me             = THIS_MODULE,
-       },
-       {
-               .name           = "MARK",
-               .family         = NFPROTO_IPV6,
+               .family         = NFPROTO_UNSPEC,
                .revision       = 0,
                .checkentry     = mark_tg_check_v0,
                .target         = mark_tg_v0,
@@ -200,7 +164,7 @@ static struct xt_target mark_tg_reg[] __read_mostly = {
        },
        {
                .name           = "MARK",
-               .family         = NFPROTO_IPV6,
+               .family         = NFPROTO_UNSPEC,
                .revision       = 1,
                .checkentry     = mark_tg_check_v1,
                .target         = mark_tg_v1,