From: Eric Dumazet <eric.dumazet@gmail.com>
To: Christoph Paasch <christoph.paasch@uclouvain.be>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH] tcp: remove duplicate th = tcp_hdr(skb)
Date: Thu, 13 Jan 2011 16:59:03 +0100 [thread overview]
Message-ID: <1294934343.3570.253.camel@edumazet-laptop> (raw)
In-Reply-To: <1294933302-28469-1-git-send-email-christoph.paasch@uclouvain.be>
Le jeudi 13 janvier 2011 à 16:41 +0100, Christoph Paasch a écrit :
> th is already set some lines before to be th = tcp_hdr(skb).
>
> Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
> ---
> net/ipv4/tcp_ipv4.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
> index 856f684..7fe29c6 100644
> --- a/net/ipv4/tcp_ipv4.c
> +++ b/net/ipv4/tcp_ipv4.c
> @@ -1644,7 +1644,6 @@ int tcp_v4_rcv(struct sk_buff *skb)
> if (!skb_csum_unnecessary(skb) && tcp_v4_checksum_init(skb))
> goto bad_packet;
>
Well... no please.
> - th = tcp_hdr(skb);
> iph = ip_hdr(skb);
> TCP_SKB_CB(skb)->seq = ntohl(th->seq);
> TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin +
Hint : pskb_may_pull() can change tcp_hdr(skb) result.
prev parent reply other threads:[~2011-01-13 15:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-13 15:41 [PATCH] tcp: remove duplicate th = tcp_hdr(skb) Christoph Paasch
2011-01-13 15:54 ` Jesse Gross
2011-01-13 15:59 ` Eric Dumazet [this message]
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=1294934343.3570.253.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=christoph.paasch@uclouvain.be \
--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