All of lore.kernel.org
 help / color / mirror / Atom feed
* TCPMSS is not restricted to mangle table
@ 2005-12-05  0:27 Patrick McHardy
  2005-12-05  0:45 ` Herve Eychenne
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Patrick McHardy @ 2005-12-05  0:27 UTC (permalink / raw)
  To: Netfilter Development Mailinglist; +Cc: Harald Welte

I just noticed the TCPMSS target is not restricted to the
mangle table. Any opinions about whether we should change
this, perhaps with a warning period?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: TCPMSS is not restricted to mangle table
  2005-12-05  0:27 TCPMSS is not restricted to mangle table Patrick McHardy
@ 2005-12-05  0:45 ` Herve Eychenne
  2005-12-05  1:11   ` Patrick McHardy
  2005-12-05  0:55 ` Tom Eastep
  2005-12-05  1:33 ` Philip Craig
  2 siblings, 1 reply; 11+ messages in thread
From: Herve Eychenne @ 2005-12-05  0:45 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Harald Welte, Netfilter Development Mailinglist

On Mon, Dec 05, 2005 at 01:27:09AM +0100, Patrick McHardy wrote:

> I just noticed the TCPMSS target is not restricted to the
> mangle table. Any opinions about whether we should change
> this, perhaps with a warning period?

See the manpage itself... I just copy-pasted the kernel config description
(probably written by Marc Boucher?) when adding TCPMSS to the manpage
some years ago.

So look for TCPMSS, notice the given example:
       iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN \
                    -j TCPMSS --clamp-mss-to-pmtu

and realize that most uses of TCPMSS (which I fear are not that
rare) probably occur within the filter table.
You can expect a global change to be quite difficult, I guess... :-(

 Herve

-- 
 _
(°=  Hervé Eychenne
//)
v_/_ WallFire project:  http://www.wallfire.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: TCPMSS is not restricted to mangle table
  2005-12-05  0:27 TCPMSS is not restricted to mangle table Patrick McHardy
  2005-12-05  0:45 ` Herve Eychenne
@ 2005-12-05  0:55 ` Tom Eastep
  2005-12-05  1:33 ` Philip Craig
  2 siblings, 0 replies; 11+ messages in thread
From: Tom Eastep @ 2005-12-05  0:55 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Harald Welte, Patrick McHardy

[-- Attachment #1: Type: text/plain, Size: 567 bytes --]

On Sunday 04 December 2005 16:27, Patrick McHardy wrote:
> I just noticed the TCPMSS target is not restricted to the
> mangle table. Any opinions about whether we should change
> this, perhaps with a warning period?

You are aware that the iptables man page includes an example of the TCPMSS 
target being used in the filter table? 

-Tom
-- 
Tom Eastep    \ Nothing is foolproof to a sufficiently talented fool
Shoreline,     \ http://shorewall.net
Washington USA  \ teastep@shorewall.net
PGP Public Key   \ https://lists.shorewall.net/teastep.pgp.key

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: TCPMSS is not restricted to mangle table
  2005-12-05  0:45 ` Herve Eychenne
@ 2005-12-05  1:11   ` Patrick McHardy
  2005-12-06  4:30     ` Aleksandar Milivojevic
  0 siblings, 1 reply; 11+ messages in thread
From: Patrick McHardy @ 2005-12-05  1:11 UTC (permalink / raw)
  To: Herve Eychenne; +Cc: Harald Welte, Netfilter Development Mailinglist

Herve Eychenne wrote:
> On Mon, Dec 05, 2005 at 01:27:09AM +0100, Patrick McHardy wrote:
> 
> 
>>I just noticed the TCPMSS target is not restricted to the
>>mangle table. Any opinions about whether we should change
>>this, perhaps with a warning period?
> 
> 
> See the manpage itself... I just copy-pasted the kernel config description
> (probably written by Marc Boucher?) when adding TCPMSS to the manpage
> some years ago.
> 
> So look for TCPMSS, notice the given example:
>        iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN \
>                     -j TCPMSS --clamp-mss-to-pmtu
> 
> and realize that most uses of TCPMSS (which I fear are not that
> rare) probably occur within the filter table.
> You can expect a global change to be quite difficult, I guess... :-(

Thanks, I didn't know this, I'm going to change this to refer to
the mangle table. This still leaves the option of a warning, but
want I really wanted to know was whether anyone cares. From a
consistency point of view it should be restricted, for the
functionality it doesn't matter.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: TCPMSS is not restricted to mangle table
  2005-12-05  0:27 TCPMSS is not restricted to mangle table Patrick McHardy
  2005-12-05  0:45 ` Herve Eychenne
  2005-12-05  0:55 ` Tom Eastep
@ 2005-12-05  1:33 ` Philip Craig
  2 siblings, 0 replies; 11+ messages in thread
From: Philip Craig @ 2005-12-05  1:33 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Harald Welte, Netfilter Development Mailinglist

On 12/05/2005 10:27 AM, Patrick McHardy wrote:
> I just noticed the TCPMSS target is not restricted to the
> mangle table. Any opinions about whether we should change
> this, perhaps with a warning period?

The historical reason for this is that originally the mangle table
only had PREROUTING and OUTPUT hooks, and so you couldn't clamp
forwarded packets in the mangle table (since it needs the outgoing
interface).

The majority of existing scripts and documentation still reference
the filter table.  So changing this will affect most of its users.

So I think update the official documentation for consistency, but
leave the code how it is.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: TCPMSS is not restricted to mangle table
  2005-12-05  1:11   ` Patrick McHardy
@ 2005-12-06  4:30     ` Aleksandar Milivojevic
  2005-12-06  5:12       ` Patrick McHardy
  0 siblings, 1 reply; 11+ messages in thread
From: Aleksandar Milivojevic @ 2005-12-06  4:30 UTC (permalink / raw)
  To: Netfilter Development Mailinglist

Patrick McHardy wrote:

> Thanks, I didn't know this, I'm going to change this to refer to
> the mangle table. This still leaves the option of a warning, but
> want I really wanted to know was whether anyone cares. From a
> consistency point of view it should be restricted, for the
> functionality it doesn't matter.

 From consumer (of your code) point of view, I do care.  The current 
documentation was clearly encouraging (by example) use of TCPMSS from 
filter table.  My guess is that majority of production systems using 
TCPMSS target are using it from filter table.  If the only reason is 
consistency (nothing is going to be fixed by the change, and nothing is 
going to be broken by leaving it as is), a warning now (in manual page, 
right next to the example) and change on next major kernel release (2.7) 
might be the best approach.  I'd leave things as is for 2.6 series of 
kernels.

Just my 2 cents.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: TCPMSS is not restricted to mangle table
  2005-12-06  4:30     ` Aleksandar Milivojevic
@ 2005-12-06  5:12       ` Patrick McHardy
  2006-01-03  7:05         ` Jan Engelhardt
  0 siblings, 1 reply; 11+ messages in thread
From: Patrick McHardy @ 2005-12-06  5:12 UTC (permalink / raw)
  To: Aleksandar Milivojevic; +Cc: Netfilter Development Mailinglist

Aleksandar Milivojevic wrote:
> Patrick McHardy wrote:
> 
>> Thanks, I didn't know this, I'm going to change this to refer to
>> the mangle table. This still leaves the option of a warning, but
>> want I really wanted to know was whether anyone cares. From a
>> consistency point of view it should be restricted, for the
>> functionality it doesn't matter.
> 
> 
>  From consumer (of your code) point of view, I do care.  The current 
> documentation was clearly encouraging (by example) use of TCPMSS from 
> filter table.  My guess is that majority of production systems using 
> TCPMSS target are using it from filter table.  If the only reason is 
> consistency (nothing is going to be fixed by the change, and nothing is 
> going to be broken by leaving it as is), a warning now (in manual page, 
> right next to the example) and change on next major kernel release (2.7) 
> might be the best approach.  I'd leave things as is for 2.6 series of 
> kernels.

I agree. Just to make it clear, I do not intend to break it for no
good reason. I was just surprised that when trying to unload it
after flushing the mangle table there was still one reference left
(from the debian ppp ip-up script). There is one potential reason
to change it, packet classification algorithms like nf-hipac have
an easier job if they can rely on certain conditions, like no
changing of the packet in the filter table. But for now I've only
updated the man-page.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: TCPMSS is not restricted to mangle table
  2005-12-06  5:12       ` Patrick McHardy
@ 2006-01-03  7:05         ` Jan Engelhardt
  2006-01-03 11:14           ` Patrick McHardy
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Engelhardt @ 2006-01-03  7:05 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Netfilter Development Mailinglist

>> From consumer (of your code) point of view, I do care.  The current
>> documentation was clearly encouraging (by example) use of TCPMSS from
>> filter table.  My guess is that majority of production systems using
>> TCPMSS target are using it from filter table.  If the only reason is
>> consistency (nothing is going to be fixed by the change, and nothing is
>> going to be broken by leaving it as is), a warning now (in manual page,
>> right next to the example) and change on next major kernel release (2.7)
>> might be the best approach.  I'd leave things as is for 2.6 series of
>> kernels.
>
> I agree. Just to make it clear, I do not intend to break it for no
> good reason. I was just surprised that when trying to unload it
> after flushing the mangle table there was still one reference left
> (from the debian ppp ip-up script). There is one potential reason
> to change it, packet classification algorithms like nf-hipac have
> an easier job if they can rely on certain conditions, like no
> changing of the packet in the filter table. But for now I've only
> updated the man-page.

Since the Linux kernel does not follow the old stable<->devel 
(2.even<->2.uneven) model, every new version is allowed to
break an older one.

On the way to restrict TCPMSS to -t mangle, the -m state
could also be obsoleted in favor of -m conntrack.




Jan Engelhardt
-- 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: TCPMSS is not restricted to mangle table
  2006-01-03  7:05         ` Jan Engelhardt
@ 2006-01-03 11:14           ` Patrick McHardy
  2006-01-03 11:38             ` Jan Engelhardt
  0 siblings, 1 reply; 11+ messages in thread
From: Patrick McHardy @ 2006-01-03 11:14 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Netfilter Development Mailinglist

Jan Engelhardt wrote:
> Since the Linux kernel does not follow the old stable<->devel 
> (2.even<->2.uneven) model, every new version is allowed to
> break an older one.

Thats complete nonsense.

> On the way to restrict TCPMSS to -t mangle, the -m state
> could also be obsoleted in favor of -m conntrack.

I'm not going to restrict TCPMSS to mangle - but I'm
considering adding a warning. I also don't see a reason
to deprecate the state match, its totally trivial code
and needs a lot less memory than the conntrack match.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: TCPMSS is not restricted to mangle table
  2006-01-03 11:14           ` Patrick McHardy
@ 2006-01-03 11:38             ` Jan Engelhardt
  2006-01-06 14:32               ` Harald Welte
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Engelhardt @ 2006-01-03 11:38 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Netfilter Development Mailinglist


>> On the way to restrict TCPMSS to -t mangle, the -m state
>> could also be obsoleted in favor of -m conntrack.
>
> I'm not going to restrict TCPMSS to mangle - but I'm
> considering adding a warning. I also don't see a reason
> to deprecate the state match, its totally trivial code
> and needs a lot less memory than the conntrack match.
>
But it's duplicate code, in terms of functionality.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: TCPMSS is not restricted to mangle table
  2006-01-03 11:38             ` Jan Engelhardt
@ 2006-01-06 14:32               ` Harald Welte
  0 siblings, 0 replies; 11+ messages in thread
From: Harald Welte @ 2006-01-06 14:32 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Netfilter Development Mailinglist, Patrick McHardy

[-- Attachment #1: Type: text/plain, Size: 1337 bytes --]

On Tue, Jan 03, 2006 at 12:38:54PM +0100, Jan Engelhardt wrote:
> 
> >> On the way to restrict TCPMSS to -t mangle, the -m state
> >> could also be obsoleted in favor of -m conntrack.
> >
> > I'm not going to restrict TCPMSS to mangle - but I'm
> > considering adding a warning. I also don't see a reason
> > to deprecate the state match, its totally trivial code
> > and needs a lot less memory than the conntrack match.
> >
> But it's duplicate code, in terms of functionality.

if you're really so worried about the duplicate code, you could create a
single module (with a MODULE_ALIAS) that registers two matches, one
called "state", the other called "conntrack".

That sounds like the cleanest possible solution without breaking anything.

btw: if you seriously consider implementing my suggestion, please use
the "x_tables" local branch of my git tree - othrewise your patch will
clash with x_tables that is to be submitted any day now.

-- 
- Harald Welte <laforge@netfilter.org>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-01-06 14:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-05  0:27 TCPMSS is not restricted to mangle table Patrick McHardy
2005-12-05  0:45 ` Herve Eychenne
2005-12-05  1:11   ` Patrick McHardy
2005-12-06  4:30     ` Aleksandar Milivojevic
2005-12-06  5:12       ` Patrick McHardy
2006-01-03  7:05         ` Jan Engelhardt
2006-01-03 11:14           ` Patrick McHardy
2006-01-03 11:38             ` Jan Engelhardt
2006-01-06 14:32               ` Harald Welte
2005-12-05  0:55 ` Tom Eastep
2005-12-05  1:33 ` Philip Craig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.