netfilter: xtables: slightly better error reporting
[pandora-kernel.git] / net / netfilter / xt_DSCP.c
index 74ce892..969634f 100644 (file)
@@ -9,7 +9,7 @@
  *
  * See RFC2474 for a description of the DSCP field within the IP Header.
 */
-
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 #include <linux/module.h>
 #include <linux/skbuff.h>
 #include <linux/ip.h>
@@ -60,15 +60,15 @@ dscp_tg6(struct sk_buff *skb, const struct xt_target_param *par)
        return XT_CONTINUE;
 }
 
-static bool dscp_tg_check(const struct xt_tgchk_param *par)
+static int dscp_tg_check(const struct xt_tgchk_param *par)
 {
        const struct xt_DSCP_info *info = par->targinfo;
 
        if (info->dscp > XT_DSCP_MAX) {
-               printk(KERN_WARNING "DSCP: dscp %x out of range\n", info->dscp);
-               return false;
+               pr_info("dscp %x out of range\n", info->dscp);
+               return -EDOM;
        }
-       return true;
+       return 0;
 }
 
 static unsigned int