[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1294934343.3570.253.camel@edumazet-laptop>
Date: Thu, 13 Jan 2011 16:59:03 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Christoph Paasch <christoph.paasch@...ouvain.be>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] tcp: remove duplicate th = tcp_hdr(skb)
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@...ouvain.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists