]> err.no Git - linux-2.6/blobdiff - net/netfilter/xt_CONNMARK.c
[NETFILTER]: x_tables: replace IPv4/IPv6 policy match by address family independant...
[linux-2.6] / net / netfilter / xt_CONNMARK.c
index 22506e376be5b1a17a904720c391805eba6d6163..df2486a3efd542700dbac7a7972b925e92618485 100644 (file)
@@ -37,6 +37,7 @@ target(struct sk_buff **pskb,
        const struct net_device *in,
        const struct net_device *out,
        unsigned int hooknum,
+       const struct xt_target *target,
        const void *targinfo,
        void *userinfo)
 {
@@ -74,17 +75,12 @@ target(struct sk_buff **pskb,
 static int
 checkentry(const char *tablename,
           const void *entry,
+          const struct xt_target *target,
           void *targinfo,
           unsigned int targinfosize,
           unsigned int hook_mask)
 {
        struct xt_connmark_target_info *matchinfo = targinfo;
-       if (targinfosize != XT_ALIGN(sizeof(struct xt_connmark_target_info))) {
-               printk(KERN_WARNING "CONNMARK: targinfosize %u != %Zu\n",
-                      targinfosize,
-                      XT_ALIGN(sizeof(struct xt_connmark_target_info)));
-               return 0;
-       }
 
        if (matchinfo->mode == XT_CONNMARK_RESTORE) {
            if (strcmp(tablename, "mangle") != 0) {
@@ -102,16 +98,19 @@ checkentry(const char *tablename,
 }
 
 static struct xt_target connmark_reg = {
-       .name = "CONNMARK",
-       .target = &target,
-       .checkentry = &checkentry,
-       .me = THIS_MODULE
+       .name           = "CONNMARK",
+       .target         = target,
+       .targetsize     = sizeof(struct xt_connmark_target_info),
+       .checkentry     = checkentry,
+       .me             = THIS_MODULE
 };
+
 static struct xt_target connmark6_reg = {
-       .name = "CONNMARK",
-       .target = &target,
-       .checkentry = &checkentry,
-       .me = THIS_MODULE
+       .name           = "CONNMARK",
+       .target         = target,
+       .targetsize     = sizeof(struct xt_connmark_target_info),
+       .checkentry     = checkentry,
+       .me             = THIS_MODULE
 };
 
 static int __init init(void)