From: "David S. Miller" <davem@davemloft.net>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: netfilter-devel@lists.netfilter.org, ludwig.nussel@suse.de
Subject: Re: TCP window tracking has bad side effects
Date: Fri, 10 Dec 2004 12:32:52 -0800 [thread overview]
Message-ID: <20041210123252.6b2b82ed.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0412101052450.14449@blackhole.kfki.hu>
On Fri, 10 Dec 2004 11:03:29 +0100 (CET)
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> wrote:
> Hi Ludwing,
>
> On Thu, 9 Dec 2004, Ludwig Nussel wrote:
>
> > Seems to work. The client machine no longer drops the packet and
> > properly sends RST.
>
> Thank you for the bug and test reports. Attached is the patch for kernel
> inclusion by Dave: Patrick rewived the previous one and noted that a
> condition was errorneously dropped - it's back now and a typo in logging
> is fixed as well. If you run the previous code on a production machine,
> please replace it with the new one.
Jozsef, btw, can I ask you to stop using whatever patch generating
tool you use that removes trailing spaces? It makes it so that I have
to apply your patches by hand.
For example:
> @@ -552,8 +552,8 @@
> * Both sides must send the Window Scale option
> * to enable window scaling in either direction.
> */
> - if (!(sender->flags & IP_CT_TCP_STATE_FLAG_WINDOW_SCALE
> - && receiver->flags & IP_CT_TCP_STATE_FLAG_WINDOW_SCALE))
> + if (!(sender->flags & IP_CT_TCP_FLAG_WINDOW_SCALE
> + && receiver->flags & IP_CT_TCP_FLAG_WINDOW_SCALE))
> sender->td_scale =
> receiver->td_scale = 0;
> } else {
In the sources, there is a space at the end of the line
with the "sender->td_scale =" assignment statement. Yet
in your patch, it is not there.
Same thing here:
> @@ -876,7 +880,7 @@
> WRITE_UNLOCK(&tcp_lock);
> if (LOG_INVALID(IPPROTO_TCP))
> nf_log_packet(PF_INET, 0, skb, NULL, NULL,
> - "ip_ct_tcp: invalid SYN (ignored) ");
> + "ip_ct_tcp: invalid packet ignored ");
> return NF_ACCEPT;
> case TCP_CONNTRACK_MAX:
> /* Invalid packet */
The "nf_log_packet(..." line should have a trailing space,
yet you are patching against a line that does not have it.
And finally it occurs a third time in this hunk.
> @@ -901,11 +905,12 @@
> break;
> case TCP_CONNTRACK_CLOSE:
> if (index == TCP_RST_SET
> - && test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status)
> - && conntrack->proto.tcp.last_index <= TCP_SYNACK_SET
> + && ((test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status)
> + && conntrack->proto.tcp.last_index <= TCP_SYNACK_SET)
> + || conntrack->proto.tcp.last_index == TCP_ACK_SET)
> && after(ntohl(th->ack_seq),
> conntrack->proto.tcp.last_seq)) {
> - /* Ignore RST closing down invalid SYN
> + /* Ignore RST closing down invalid SYN or ACK
> we had let trough. */
> WRITE_UNLOCK(&tcp_lock);
> if (LOG_INVALID(IPPROTO_TCP))
The line with the "/* Ignore ..." comment should have a trailing
space, yet it does not in what your patch is against.
I've read recently that one of the commonly used patch
generating tools removes the training spaces. But whatever
it is, please stop doing this :-)
next prev parent reply other threads:[~2004-12-10 20:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-01 11:02 TCP window tracking has bad side effects Ludwig Nussel
2004-12-01 12:16 ` Jozsef Kadlecsik
2004-12-01 15:39 ` Ludwig Nussel
2004-12-03 8:44 ` Jozsef Kadlecsik
2004-12-06 8:35 ` Jozsef Kadlecsik
2004-12-09 16:26 ` Ludwig Nussel
2004-12-10 10:03 ` Jozsef Kadlecsik
2004-12-10 20:32 ` David S. Miller [this message]
2004-12-10 22:14 ` Jozsef Kadlecsik
2004-12-10 17:22 ` Bill Rugolsky Jr.
2004-12-10 19:42 ` Jozsef Kadlecsik
2004-12-10 19:51 ` David S. Miller
2005-01-10 17:13 ` Jan Du Caju
2005-01-10 17:16 ` Phil Oester
2004-12-02 0:54 ` Phil Oester
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=20041210123252.6b2b82ed.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=ludwig.nussel@suse.de \
--cc=netfilter-devel@lists.netfilter.org \
/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 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.