vmlinux.lds.h: restructure BSS linker script macros
[linux-block.git] / net / netfilter / xt_TPROXY.c
index 183f251d2f06e53bfe877ac989387ccf58beeea2..1340c2fa3621e54f651d4a66b25edd79007e93c2 100644 (file)
 #include <net/netfilter/nf_tproxy_core.h>
 
 static unsigned int
-tproxy_tg(struct sk_buff *skb,
-         const struct net_device *in,
-         const struct net_device *out,
-         unsigned int hooknum,
-         const struct xt_target *target,
-         const void *targinfo)
+tproxy_tg(struct sk_buff *skb, const struct xt_target_param *par)
 {
        const struct iphdr *iph = ip_hdr(skb);
-       const struct xt_tproxy_target_info *tgi = targinfo;
+       const struct xt_tproxy_target_info *tgi = par->targinfo;
        struct udphdr _hdr, *hp;
        struct sock *sk;
 
@@ -44,7 +39,7 @@ tproxy_tg(struct sk_buff *skb,
        sk = nf_tproxy_get_sock_v4(dev_net(skb->dev), iph->protocol,
                                   iph->saddr, tgi->laddr ? tgi->laddr : iph->daddr,
                                   hp->source, tgi->lport ? tgi->lport : hp->dest,
-                                  in, true);
+                                  par->in, true);
 
        /* NOTE: assign_sock consumes our sk reference */
        if (sk && nf_tproxy_assign_sock(skb, sk)) {
@@ -64,14 +59,9 @@ tproxy_tg(struct sk_buff *skb,
        return NF_DROP;
 }
 
-static bool
-tproxy_tg_check(const char *tablename,
-               const void *entry,
-               const struct xt_target *target,
-               void *targetinfo,
-               unsigned int hook_mask)
+static bool tproxy_tg_check(const struct xt_tgchk_param *par)
 {
-       const struct ipt_ip *i = entry;
+       const struct ipt_ip *i = par->entryinfo;
 
        if ((i->proto == IPPROTO_TCP || i->proto == IPPROTO_UDP)
            && !(i->invflags & IPT_INV_PROTO))