Re: [PATCH 3/8] netfilter: xtables: inclusion of xt_TEE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 2010-04-13 18:32, Patrick McHardy wrote:

>>>> +tee_tg_route4(struct sk_buff *skb, const struct xt_tee_tginfo *info)
>>>> +{
>>>> +	const struct iphdr *iph = ip_hdr(skb);
>>>> +	struct rtable *rt;
>>>> +	struct flowi fl;
>>>> +
>>>> +	memset(&fl, 0, sizeof(fl));
>>>> +	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(dev_net(skb->dev), &rt, &fl) != 0) {
>>> You can't use skb->dev in modules that are valid to use in LOCAL_OUT.

Let's use dev_net(skb_dst(skb)->dev). skb_dst seems fine,
as __ip_local_out already makes use of it.

>>>> +#ifdef WITH_CONNTRACK
>>>> +	nf_conntrack_put(skb->nfct);
>>>> +	skb->nfct     = &tee_track.ct_general;
>>>> +	skb->nfctinfo = IP_CT_NEW;
>>>> +	nf_conntrack_get(skb->nfct);
>>>> +#endif
>>> Why do we still need this? I thought the reentrancy-counter should take
>>> care of this?
>> 
>> Did I really delete that commit... it's done so that conntrack
>> does not count the duplicated packets towards the original
>> connection.
>
>Simply untrack it perhaps?

Well, that's what the four lines do, that's what NOTRACK does -
assigning to a fake nfct, isn't it?


thanks,
Jan
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux