From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Hannes Frederic Sowa <hannes@stressinduktion.org>,
netdev@vger.kernel.org
Cc: edumazet@google.com, vyasevich@gmail.com, bcodding@redhat.com,
tom@herbertland.com
Subject: Re: [PATCH net v2 2/4] ipv4: add defensive check for CHECKSUM_PARTIAL skbs in ip_fragment
Date: Tue, 27 Oct 2015 22:01:44 +0300 [thread overview]
Message-ID: <562FCA18.8090008@cogentembedded.com> (raw)
In-Reply-To: <1445958135-19805-3-git-send-email-hannes@stressinduktion.org>
Hello.
On 10/27/2015 06:02 PM, Hannes Frederic Sowa wrote:
> CHECKSUM_PARTIAL skbs should never arrive in ip_fragment. If we get one
> of those warn about them once and handle them gracefully by recalculating
> the checksum.
>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Vlad Yasevich <vyasevich@gmail.com>
> Cc: Benjamin Coddington <bcodding@redhat.com>
> Cc: Tom Herbert <tom@herbertland.com>
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
> ---
> net/ipv4/ip_output.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
> index 0b02417..3f94a3b 100644
> --- a/net/ipv4/ip_output.c
> +++ b/net/ipv4/ip_output.c
> @@ -533,6 +533,11 @@ int ip_do_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
>
> dev = rt->dst.dev;
>
> + /* for offloaded checksums cleanup checksum before fragmentation */
> + if (WARN_ON_ONCE(skb->ip_summed == CHECKSUM_PARTIAL) &&
> + (err = skb_checksum_help(skb)))
scripts/checkpatch.pl shou;d have complained about using = in the *if*
expression.
> + goto fail;
> +
> /*
> * Point into the IP datagram header.
> */
[...]
MBR, Sergei
next prev parent reply other threads:[~2015-10-27 19:01 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 15:02 [PATCH net v2 0/4] net: clean up interactions of CHECKSUM_PARTIAL and fragmentation Hannes Frederic Sowa
2015-10-27 15:02 ` [PATCH net v2 1/4] ipv4: no CHECKSUM_PARTIAL on MSG_MORE corked sockets Hannes Frederic Sowa
2015-10-27 16:04 ` Tom Herbert
2015-10-27 16:34 ` Hannes Frederic Sowa
2015-10-27 16:41 ` Tom Herbert
2015-10-27 15:02 ` [PATCH net v2 2/4] ipv4: add defensive check for CHECKSUM_PARTIAL skbs in ip_fragment Hannes Frederic Sowa
2015-10-27 16:06 ` Tom Herbert
2015-10-27 18:30 ` Hannes Frederic Sowa
2015-10-27 18:46 ` Tom Herbert
2015-10-27 19:01 ` Sergei Shtylyov [this message]
2015-10-27 19:15 ` Hannes Frederic Sowa
2015-10-27 15:02 ` [PATCH net v2 3/4] ipv6: no CHECKSUM_PARTIAL on MSG_MORE corked sockets Hannes Frederic Sowa
2015-10-27 16:36 ` Tom Herbert
2015-10-27 16:44 ` Hannes Frederic Sowa
2015-10-27 17:32 ` Tom Herbert
2015-10-27 18:29 ` Hannes Frederic Sowa
2015-10-27 18:37 ` Tom Herbert
2015-10-27 19:19 ` Hannes Frederic Sowa
2015-10-27 21:42 ` Hannes Frederic Sowa
2015-10-27 22:03 ` Tom Herbert
2015-10-28 0:12 ` Hannes Frederic Sowa
2015-10-28 0:31 ` Tom Herbert
2015-10-27 15:02 ` [PATCH net v2 4/4] ipv6: add defensive check for CHECKSUM_PARTIAL skbs in ip_fragment Hannes Frederic Sowa
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=562FCA18.8090008@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=bcodding@redhat.com \
--cc=edumazet@google.com \
--cc=hannes@stressinduktion.org \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.com \
--cc=vyasevich@gmail.com \
/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).