From: Florian Westphal <fw@strlen.de>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next-2.6] syncookies: check decoded options against sysctl settings
Date: Wed, 16 Jun 2010 10:03:09 +0200 [thread overview]
Message-ID: <20100616080309.GC20287@Chamillionaire.breakpoint.cc> (raw)
In-Reply-To: <20100615.180947.241927235.davem@davemloft.net>
David Miller <davem@davemloft.net> wrote:
> From: Florian Westphal <fw@strlen.de>
> Date: Sun, 13 Jun 2010 23:34:35 +0200
>
> > - if (tcp_opt->sack_ok)
> > - tcp_sack_reset(tcp_opt);
> > + if (tcp_opt->sack_ok && !sysctl_tcp_sack)
> > + return false;
> >
>
> If you remove the tcp_sack_reset() call here, who is going to
> do it?
Right, I should have mentioned that in the changelog, sorry about that.
Bottom line is that I failed to find out why its needed.
Both call sites of this function (cookie_v4_check, cookie_v6_check)
allocate the "struct tcp_options_received" argument on the stack, zero it,
hand it to tcp_parse_options() and then call cookie_check_timestamp().
I did not find any place in tcp_parse_options that would cause
tcp_opt->num_sacks/dsack to become nonzero.
Even if it can turn nonzero, I do not see any ill effects that might
happen then. The structure is on the stack and after tcp_parse_options()
returns only a few selected members are copied to the inet_request_sock.
next prev parent reply other threads:[~2010-06-16 8:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-13 21:34 [PATCH net-next-2.6] syncookies: check decoded options against sysctl settings Florian Westphal
2010-06-16 1:09 ` David Miller
2010-06-16 8:03 ` Florian Westphal [this message]
2010-06-16 20:52 ` David Miller
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=20100616080309.GC20287@Chamillionaire.breakpoint.cc \
--to=fw@strlen.de \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).