netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: timo.lindfors@iki.fi
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] ip: reuse ip_summed of first fragment for all subsequent fragments
Date: Tue, 28 Dec 2010 13:49:05 -0800 (PST)	[thread overview]
Message-ID: <20101228.134905.183040321.davem@davemloft.net> (raw)
In-Reply-To: <1292841525-15572-1-git-send-email-timo.lindfors@iki.fi>

From: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Date: Mon, 20 Dec 2010 12:38:45 +0200

> diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
> index 439d2a3..c0743ed 100644
> --- a/net/ipv4/ip_output.c
> +++ b/net/ipv4/ip_output.c
> @@ -1167,7 +1167,7 @@ ssize_t	ip_append_page(struct sock *sk, struct page *page,
>  			/*
>  			 *	Fill in the control structures
>  			 */
> -			skb->ip_summed = CHECKSUM_NONE;
> +			skb->ip_summed = skb_prev->ip_summed;
>  			skb->csum = 0;
>  			skb_reserve(skb, hh_len);

You can't just assign skb_prev->ip_summed here, if it's CHECKSUM_PARTIAL
then things will go completely wrong.  This is especially true since
we're about to zero out skb->csum.

  reply	other threads:[~2010-12-28 21:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-14  7:51 [PATCH] ip: use checksum options of first fragment also for subsequent fragments Timo Juhani Lindfors
2010-12-17 19:58 ` David Miller
2010-12-20 10:38   ` [PATCH] ip: reuse ip_summed of first fragment for all " Timo Juhani Lindfors
2010-12-28 21:49     ` David Miller [this message]
2011-01-11 13:49       ` Timo Juhani Lindfors
2011-01-13  2:42         ` David Miller
2011-02-16  9:10           ` Timo Juhani Lindfors

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=20101228.134905.183040321.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=timo.lindfors@iki.fi \
    /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).