]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/netfilter/xt_TPROXY.c
netfilter: xtables: change targets to return error code
[net-next-2.6.git] / net / netfilter / xt_TPROXY.c
index 1340c2fa3621e54f651d4a66b25edd79007e93c2..4f246ddc5c481f5ccaf9545e55b87cc9d331c0ca 100644 (file)
@@ -9,7 +9,7 @@
  * published by the Free Software Foundation.
  *
  */
-
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 #include <linux/module.h>
 #include <linux/skbuff.h>
 #include <linux/ip.h>
@@ -59,17 +59,17 @@ tproxy_tg(struct sk_buff *skb, const struct xt_target_param *par)
        return NF_DROP;
 }
 
-static bool tproxy_tg_check(const struct xt_tgchk_param *par)
+static int tproxy_tg_check(const struct xt_tgchk_param *par)
 {
        const struct ipt_ip *i = par->entryinfo;
 
        if ((i->proto == IPPROTO_TCP || i->proto == IPPROTO_UDP)
            && !(i->invflags & IPT_INV_PROTO))
-               return true;
+               return 0;
 
-       pr_info("xt_TPROXY: Can be used only in combination with "
+       pr_info("Can be used only in combination with "
                "either -p tcp or -p udp\n");
-       return false;
+       return -EINVAL;
 }
 
 static struct xt_target tproxy_tg_reg __read_mostly = {