All of lore.kernel.org
 help / color / mirror / Atom feed
* only first TCP SYN packet consulted in nat table chains - bug or feature?
@ 2004-06-21 20:06 Krzysztof Rusocki
  2004-06-21 23:39 ` Peter Surda
  2004-06-22 13:19 ` Henrik Nordstrom
  0 siblings, 2 replies; 6+ messages in thread
From: Krzysztof Rusocki @ 2004-06-21 20:06 UTC (permalink / raw)
  To: netfilter-devel


Hi,

I have a Linux 2.4.27-pre2 based nat box,
which also alters TCPMSS of packets it
passes through.

For really long period of time I used
rule created by the following iptables combo:

iptables -t nat -A POSTROUTING -o ppp0 -p tcp --tcp-flags SYN,RST SYN \
	-m tcpmss --mss 1453: -j TCPMSS --set-mss 1452

However, quite recently I discovered
that first TCP SYN packet's MSS is altered
and latter SYN packets (in case of retransmission)
have MSS unchanged (1460 - ether).

Relevant tcpdump output (ppp0) follows:
19:23:33.178771 83.27.53.238.1206 > 1.2.3.4.45454: S [tcp sum ok]
	1844185893:1844185893(0) win 5840
	<mss 1452,sackOK,timestamp 54616709 0,nop,wscale 0> (DF)
	[tos 0x10]  (ttl 63, id 27040, len 60)   
19:23:36.177492 83.27.53.238.1206 > 1.2.3.4.45454: S [tcp sum ok]
	1844185893:1844185893(0) win 5840
	<mss 1460,sackOK,timestamp 54619709 0,nop,wscale 0> (DF)
	[tos 0x10]  (ttl 63, id 27041, len 60)   
19:23:42.175696 83.27.53.238.1206 > 1.2.3.4.45454: S [tcp sum ok]
	1844185893:1844185893(0) win 5840
	<mss 1460,sackOK,timestamp 54625709 0,nop,wscale 0> (DF)
	[tos 0x10]  (ttl 63, id 27042, len 60)

I'm just being curious here - is this a bug or feature?

For the time being I have changed that rule to use
mangle table...


Cheers,
Krzysztof

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

end of thread, other threads:[~2004-06-22 15:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-21 20:06 only first TCP SYN packet consulted in nat table chains - bug or feature? Krzysztof Rusocki
2004-06-21 23:39 ` Peter Surda
2004-06-22 13:19 ` Henrik Nordstrom
2004-06-22 13:33   ` Eric Leblond
2004-06-22 13:43     ` Jozsef Kadlecsik
2004-06-22 15:26     ` Henrik Nordstrom

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.