public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Joe Perches <joe@perches.com>
Cc: "William Allen Simpson" <william.allen.simpson@gmail.com>,
	"Andi Kleen" <andi@firstfloor.org>,
	"Linux Kernel Developers" <linux-kernel@vger.kernel.org>,
	"Linux Kernel Network Developers" <netdev@vger.kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>,
	"Eric Dumazet" <eric.dumazet@gmail.com>
Subject: Re: [PATCH v4] tcp: harmonize tcp_vx_rcv header length assumptions
Date: Thu, 14 Jan 2010 09:39:12 +0100	[thread overview]
Message-ID: <4B4ED830.4040407@trash.net> (raw)
In-Reply-To: <1263430990.1966.12.camel@Joe-Laptop.home>

Joe Perches wrote:
> On Wed, 2010-01-13 at 16:13 -0500, William Allen Simpson wrote:
>> I did today's tests on tcp_ipv4, but part of this harmonization is to
>> make v4 and v6 match up better.  As I was examining line by line, one of
>> the things that leaps out is that ipv4 has nf_reset(skb):
>>
>> tcp_ipv4:
>> 	if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb))
>> 		goto discard_and_relse;
>> 	nf_reset(skb);
>>
>> 	if (sk_filter(sk, skb))
>> 		goto discard_and_relse;
>>
>> tcp_ipv6:
>> 	if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb))
>> 		goto discard_and_relse;
>>
>> 	if (sk_filter(sk, skb))
>> 		goto discard_and_relse;
>>
>> Does anybody know why?  Should ipv6 have it?  Or at least a comment
>> explaining the reasoning for the omission?
> 
> You should ask the person that put the line in, but
> it might be because no IPv6 NAT support exists.
> 
> $ git blame -L 1658,1658 net/ipv4/tcp_ipv4.c
> b59c2701 (Patrick McHardy 2006-01-06 23:06:10 -0800 1658)       nf_reset(skb);
> 
> And
> 
> $ git log -p -1 b59c2701
> commit b59c270104f03960069596722fea70340579244d
> Author: Patrick McHardy <kaber@trash.net>
> Date:   Fri Jan 6 23:06:10 2006 -0800
> 
>     [NETFILTER]: Keep conntrack reference until IPsec policy checks are done
>     
>     Keep the conntrack reference until policy checks have been performed for
>     IPsec NAT support. The reference needs to be dropped before a packet is
>     queued to avoid having the conntrack module unloadable.

In IPv6 it is released in ip6_input.c before the packet is handed to
the protocol handler.

  reply	other threads:[~2010-01-14  8:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-10 13:02 query: redundant tcp header length checks? William Allen Simpson
2010-01-12 10:05 ` [PATCH] tcp: harmonize tcp_vx_rcv header length assumptions William Allen Simpson
2010-01-12 10:46   ` Eric Dumazet
2010-01-12 17:11     ` William Allen Simpson
2010-01-13  9:50       ` William Allen Simpson
2010-01-12 17:14     ` William Allen Simpson
2010-01-13 10:48 ` [PATCH v4] " William Allen Simpson
2010-01-13 11:56   ` Andi Kleen
2010-01-13 15:36     ` William Allen Simpson
2010-01-13 15:53       ` Andi Kleen
2010-01-13 16:40         ` [PATCH] Makefile: Document ability to make file.lst and file.S Joe Perches
2010-01-13 17:14           ` Andi Kleen
2010-01-13 17:31             ` Joe Perches
2010-01-13 19:51               ` William Allen Simpson
2010-01-14  3:26               ` Américo Wang
2010-01-18 12:29               ` Michal Marek
2010-01-13 19:49         ` [PATCH v4] tcp: harmonize tcp_vx_rcv header length assumptions William Allen Simpson
2010-01-13 20:19           ` Andi Kleen
2010-01-13 21:13           ` William Allen Simpson
2010-01-14  1:03             ` Joe Perches
2010-01-14  8:39               ` Patrick McHardy [this message]
2010-01-14 15:02                 ` William Allen Simpson
2010-01-14 15:10 ` [PATCH v5] " William Allen Simpson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B4ED830.4040407@trash.net \
    --to=kaber@trash.net \
    --cc=andi@firstfloor.org \
    --cc=eric.dumazet@gmail.com \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=william.allen.simpson@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox