- patches.arch/x86_mce_intel_decode_physical_address.patch:
[linux-flexiantxendom0-3.2.10.git] / net / netfilter / xt_cluster.c
index 225ee3e..30b95a1 100644 (file)
@@ -5,6 +5,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 #include <linux/module.h>
 #include <linux/skbuff.h>
 #include <linux/jhash.h>
@@ -85,7 +86,7 @@ xt_cluster_is_multicast_addr(const struct sk_buff *skb, u_int8_t family)
 }
 
 static bool
-xt_cluster_mt(const struct sk_buff *skb, const struct xt_match_param *par)
+xt_cluster_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        struct sk_buff *pskb = (struct sk_buff *)skb;
        const struct xt_cluster_match_info *info = par->matchinfo;
@@ -131,22 +132,22 @@ xt_cluster_mt(const struct sk_buff *skb, const struct xt_match_param *par)
               !!(info->flags & XT_CLUSTER_F_INV);
 }
 
-static bool xt_cluster_mt_checkentry(const struct xt_mtchk_param *par)
+static int xt_cluster_mt_checkentry(const struct xt_mtchk_param *par)
 {
        struct xt_cluster_match_info *info = par->matchinfo;
 
        if (info->total_nodes > XT_CLUSTER_NODES_MAX) {
-               printk(KERN_ERR "xt_cluster: you have exceeded the maximum "
-                               "number of cluster nodes (%u > %u)\n",
-                               info->total_nodes, XT_CLUSTER_NODES_MAX);
-               return false;
+               pr_info("you have exceeded the maximum "
+                       "number of cluster nodes (%u > %u)\n",
+                       info->total_nodes, XT_CLUSTER_NODES_MAX);
+               return -EINVAL;
        }
        if (info->node_mask >= (1ULL << info->total_nodes)) {
-               printk(KERN_ERR "xt_cluster: this node mask cannot be "
-                               "higher than the total number of nodes\n");
-               return false;
+               pr_info("this node mask cannot be "
+                       "higher than the total number of nodes\n");
+               return -EDOM;
        }
-       return true;
+       return 0;
 }
 
 static struct xt_match xt_cluster_match __read_mostly = {