net: Put flowi_* prefix on AF independent members of struct flowi
[linux-3.10.git] / net / netfilter / xt_TEE.c
index d7920d9..cb14ae2 100644 (file)
@@ -68,17 +68,18 @@ tee_tg_route4(struct sk_buff *skb, const struct xt_tee_tginfo *info)
        if (info->priv) {
                if (info->priv->oif == -1)
                        return false;
-               fl.oif = info->priv->oif;
+               fl.flowi_oif = info->priv->oif;
        }
-       fl.nl_u.ip4_u.daddr = info->gw.ip;
-       fl.nl_u.ip4_u.tos   = RT_TOS(iph->tos);
-       fl.nl_u.ip4_u.scope = RT_SCOPE_UNIVERSE;
-       if (ip_route_output_key(net, &rt, &fl) != 0)
+       fl.fl4_dst = info->gw.ip;
+       fl.fl4_tos = RT_TOS(iph->tos);
+       fl.fl4_scope = RT_SCOPE_UNIVERSE;
+       rt = ip_route_output_key(net, &fl);
+       if (IS_ERR(rt))
                return false;
 
-       dst_release(skb_dst(skb));
-       skb_dst_set(skb, &rt->u.dst);
-       skb->dev      = rt->u.dst.dev;
+       skb_dst_drop(skb);
+       skb_dst_set(skb, &rt->dst);
+       skb->dev      = rt->dst.dev;
        skb->protocol = htons(ETH_P_IP);
        return true;
 }
@@ -104,7 +105,7 @@ tee_tg4(struct sk_buff *skb, const struct xt_action_param *par)
 #ifdef WITH_CONNTRACK
        /* Avoid counting cloned packets towards the original connection. */
        nf_conntrack_put(skb->nfct);
-       skb->nfct     = &nf_conntrack_untracked.ct_general;
+       skb->nfct     = &nf_ct_untracked_get()->ct_general;
        skb->nfctinfo = IP_CT_NEW;
        nf_conntrack_get(skb->nfct);
 #endif
@@ -148,16 +149,16 @@ tee_tg_route6(struct sk_buff *skb, const struct xt_tee_tginfo *info)
        if (info->priv) {
                if (info->priv->oif == -1)
                        return false;
-               fl.oif = info->priv->oif;
+               fl.flowi_oif = info->priv->oif;
        }
-       fl.nl_u.ip6_u.daddr = info->gw.in6;
-       fl.nl_u.ip6_u.flowlabel = ((iph->flow_lbl[0] & 0xF) << 16) |
-                                 (iph->flow_lbl[1] << 8) | iph->flow_lbl[2];
+       fl.fl6_dst = info->gw.in6;
+       fl.fl6_flowlabel = ((iph->flow_lbl[0] & 0xF) << 16) |
+                          (iph->flow_lbl[1] << 8) | iph->flow_lbl[2];
        dst = ip6_route_output(net, NULL, &fl);
        if (dst == NULL)
                return false;
 
-       dst_release(skb_dst(skb));
+       skb_dst_drop(skb);
        skb_dst_set(skb, dst);
        skb->dev      = dst->dev;
        skb->protocol = htons(ETH_P_IPV6);
@@ -177,7 +178,7 @@ tee_tg6(struct sk_buff *skb, const struct xt_action_param *par)
 
 #ifdef WITH_CONNTRACK
        nf_conntrack_put(skb->nfct);
-       skb->nfct     = &nf_conntrack_untracked.ct_general;
+       skb->nfct     = &nf_ct_untracked_get()->ct_general;
        skb->nfctinfo = IP_CT_NEW;
        nf_conntrack_get(skb->nfct);
 #endif