public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Simon Arlott <simon@fire.lp0.eu>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Patrick McHardy <kaber@trash.net>,
	William Allen Simpson <william.allen.simpson@gmail.com>,
	netdev <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] xt_TCPMSS: SYN packets are allowed to contain data
Date: Wed, 20 Jan 2010 21:51:33 +0000	[thread overview]
Message-ID: <4B577AE5.6080303@simon.arlott.org.uk> (raw)
In-Reply-To: <alpine.LSU.2.01.1001202240350.18680@obet.zrqbmnf.qr>

On 20/01/10 21:41, Jan Engelhardt wrote:
> On Wednesday 2010-01-20 22:39, Jan Engelhardt wrote:
> 
>>On Wednesday 2010-01-20 22:21, Simon Arlott wrote:
>>
>>>The TCPMSS target is dropping SYN packets where:
>>>  1) There is data, or
>>>  2) The data offset makes the TCP header larger than
>>>  the packet.
>>>
>>>Both of these result in an error level printk.
>>>
>>>This change fixes the drop of SYN packets with data
>>>(because the MSS option can safely be modified) and
>>>passes packets with no MSS option instead of adding
>>>one (which is not valid).
>>
>>Can you explain why the automatic addition of a MSS option is removed?
> 
> That is, of course, for the git log. If I followed the thread right, it 
> was that adding the option could exceed the MTU. Well, can't we check 
> for the outgoing MTU?

The MSS option is for the MRU of whoever sent the SYN packet. There's no
way of knowing this information so it's not possible to avoid using an
MSS that is too large. With no option, "any" segment size could be used,
which implies 536 to match the MRU of 576.

The other reason for not being able to add it is that it may increase the
packet size beyond an MRU/MTU limit if there is data. There's no guarantee
we'll see an ICMP error message if this occurs, because the limit doesn't
have to be local and the return path does not need to be the same. The
original host won't know that the packet is going to be increased in size.

-- 
Simon Arlott

  reply	other threads:[~2010-01-20 21:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-18 21:08 [PATCH] xt_TCPMSS: SYN packets are allowed to contain data Simon Arlott
2010-01-19  9:17 ` William Allen Simpson
2010-01-19  9:30   ` Patrick McHardy
2010-01-19 12:43     ` Simon Arlott
2010-01-19 12:53       ` Patrick McHardy
2010-01-19 12:50   ` Simon Arlott
2010-01-19 15:44     ` William Allen Simpson
2010-01-20 12:59       ` Simon Arlott
2010-01-20 21:21         ` Simon Arlott
2010-01-20 21:39           ` Jan Engelhardt
2010-01-20 21:41             ` Jan Engelhardt
2010-01-20 21:51               ` Simon Arlott [this message]
2010-01-20 22:22                 ` Amos Jeffries
2010-01-20 23:14               ` Patrick McHardy
2010-01-21 12:47                 ` Simon Arlott
2010-01-21 12:58                   ` Jan Engelhardt
2010-01-21 13:02                   ` Patrick McHardy
2010-01-21 20:13                     ` Simon Arlott
2010-02-02 14:34                       ` Patrick McHardy

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=4B577AE5.6080303@simon.arlott.org.uk \
    --to=simon@fire.lp0.eu \
    --cc=jengelh@medozas.de \
    --cc=kaber@trash.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@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