From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org, zhiyunq@umich.edu, nanditad@google.com,
ncardwell@google.com, john.dykstra1@gmail.com
Subject: Re: [PATCH] tcp: should drop incoming frames without ACK flag set
Date: Wed, 26 Dec 2012 14:11:54 -0800 (PST) [thread overview]
Message-ID: <20121226.141154.115080358245263295.davem@davemloft.net> (raw)
In-Reply-To: <1356541801.20133.20615.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 26 Dec 2012 09:10:01 -0800
> @@ -5540,6 +5540,9 @@ no_ack:
> }
>
> slow_path:
> + if (!th->ack)
> + goto discard;
One too many tabs there on that last line :-)
> +
> if (len < (th->doff << 2) || tcp_checksum_complete_user(sk, skb))
> goto csum_error;
>
> @@ -5551,7 +5554,7 @@ slow_path:
Also, I would say that this checksum test should come first, because
that takes priority since you could be testing the ACK bit of a
corrupted packet.
Better to get the statistic bump on the bad checksum then a silent
drop on the ACK being cleared.
> @@ -5984,11 +5987,15 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
> if (tcp_check_req(sk, skb, req, NULL, true) == NULL)
> goto discard;
> }
> +
> + if (!th->ack)
> + goto discard;
> +
And that is effectively what is going to happen in this case since
the caller has already done the checksum checks.
Thanks.
next prev parent reply other threads:[~2012-12-26 22:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-26 17:10 [PATCH] tcp: should drop incoming frames without ACK flag set Eric Dumazet
2012-12-26 22:11 ` David Miller [this message]
2012-12-26 22:44 ` Eric Dumazet
2012-12-26 23:09 ` 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=20121226.141154.115080358245263295.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=john.dykstra1@gmail.com \
--cc=nanditad@google.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=zhiyunq@umich.edu \
/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