]> err.no Git - linux-2.6/blobdiff - net/ipv4/netfilter/ipt_CLUSTERIP.c
[NETFILTER]: Rename init functions.
[linux-2.6] / net / ipv4 / netfilter / ipt_CLUSTERIP.c
index 45c52d8f4d99750c0407b8d8cd3510792e85ef3f..e4768a31718b83e530121f3049e9ef320797dc90 100644 (file)
@@ -311,6 +311,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)
 {
@@ -379,22 +380,17 @@ target(struct sk_buff **pskb,
 
 static int
 checkentry(const char *tablename,
-          const struct ipt_entry *e,
+          const void *e_void,
+          const struct xt_target *target,
            void *targinfo,
            unsigned int targinfosize,
            unsigned int hook_mask)
 {
        struct ipt_clusterip_tgt_info *cipinfo = targinfo;
+       const struct ipt_entry *e = e_void;
 
        struct clusterip_config *config;
 
-       if (targinfosize != IPT_ALIGN(sizeof(struct ipt_clusterip_tgt_info))) {
-               printk(KERN_WARNING "CLUSTERIP: targinfosize %u != %Zu\n",
-                      targinfosize,
-                      IPT_ALIGN(sizeof(struct ipt_clusterip_tgt_info)));
-               return 0;
-       }
-
        if (cipinfo->hash_mode != CLUSTERIP_HASHMODE_SIP &&
            cipinfo->hash_mode != CLUSTERIP_HASHMODE_SIP_SPT &&
            cipinfo->hash_mode != CLUSTERIP_HASHMODE_SIP_SPT_DPT) {
@@ -464,9 +460,10 @@ checkentry(const char *tablename,
 }
 
 /* drop reference count of cluster config when rule is deleted */
-static void destroy(void *matchinfo, unsigned int matchinfosize)
+static void destroy(const struct xt_target *target, void *targinfo,
+                   unsigned int targinfosize)
 {
-       struct ipt_clusterip_tgt_info *cipinfo = matchinfo;
+       struct ipt_clusterip_tgt_info *cipinfo = targinfo;
 
        /* if no more entries are referencing the config, remove it
         * from the list and destroy the proc entry */
@@ -475,12 +472,13 @@ static void destroy(void *matchinfo, unsigned int matchinfosize)
        clusterip_config_put(cipinfo->config);
 }
 
-static struct ipt_target clusterip_tgt = { 
-       .name = "CLUSTERIP",
-       .target = &target, 
-       .checkentry = &checkentry, 
-       .destroy = &destroy,
-       .me = THIS_MODULE
+static struct ipt_target clusterip_tgt = {
+       .name           = "CLUSTERIP",
+       .target         = target,
+       .targetsize     = sizeof(struct ipt_clusterip_tgt_info),
+       .checkentry     = checkentry,
+       .destroy        = destroy,
+       .me             = THIS_MODULE
 };
 
 
@@ -772,15 +770,15 @@ cleanup_none:
        return -EINVAL;
 }
 
-static int __init init(void)
+static int __init ipt_clusterip_init(void)
 {
        return init_or_cleanup(0);
 }
 
-static void __exit fini(void)
+static void __exit ipt_clusterip_fini(void)
 {
        init_or_cleanup(1);
 }
 
-module_init(init);
-module_exit(fini);
+module_init(ipt_clusterip_init);
+module_exit(ipt_clusterip_fini);