Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-drm-fsl-dcu.git] / net / netfilter / xt_TPROXY.c
index 1340c2fa3621e54f651d4a66b25edd79007e93c2..e1a0dedac2580b1aeb5fe1d52d6e5f60f082005b 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>
@@ -25,7 +25,7 @@
 #include <net/netfilter/nf_tproxy_core.h>
 
 static unsigned int
-tproxy_tg(struct sk_buff *skb, const struct xt_target_param *par)
+tproxy_tg(struct sk_buff *skb, const struct xt_action_param *par)
 {
        const struct iphdr *iph = ip_hdr(skb);
        const struct xt_tproxy_target_info *tgi = par->targinfo;
@@ -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 = {