From: Eric Dumazet <eric.dumazet@gmail.com>
To: Ang Way Chuang <wcang79@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] bridge: Pseudo-header required for the checksum of ICMP6 header of MLD
Date: Wed, 24 Aug 2011 09:18:27 +0200 [thread overview]
Message-ID: <1314170307.4478.28.camel@edumazet-laptop> (raw)
In-Reply-To: <4E5495EA.1080906@gmail.com>
Le mercredi 24 août 2011 à 15:10 +0900, Ang Way Chuang a écrit :
> Just saw Eric's patch for icmp6_type. Suspect this patch may have issue for reference
> of ip6h after pskb_trim_rcsum()?
>
I dont think so, because ip6h is against skb header, not skb2 one.
> Checksum of ICMPv6 is not properly computed because the pseudo header is not used.
> Thus, the MLD packet gets dropped by the bridge. This patch fixes the problem for my
> testbed. This bug was made visible by commit ff9a57a62afbbe2d0f3a09af321f1fd7645f38a.
>
> This patch has been tested on 3.0.3. Due to lack of understanding on the checksum
> optimization and multicast snooping of the kernel stack, can someone please verify the
> correctness of this patch?
>
> Signed-off-by: Ang Way Chuang <wcang@sfc.wide.ad.jp>
> ---
> index 2d85ca7..bbf361b 100644
> --- a/net/bridge/br_multicast.c
> +++ b/net/bridge/br_multicast.c
> @@ -1528,9 +1528,12 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
> break;
> /*FALLTHROUGH*/
> case CHECKSUM_NONE:
> - skb2->csum = 0;
> - if (skb_checksum_complete(skb2))
> + if (!skb_csum_unnecessary(skb2) && csum_ipv6_magic(&ip6h->saddr,
> + &ip6h->daddr, skb2->len, IPPROTO_ICMPV6,
> + skb_checksum(skb2, 0, skb2->len, 0))) {
> + err = -EINVAL;
> goto out;
> + }
> }
>
> err = 0;
> ---
Sorry, I cannot comment on this, checksum games are hard :(
next prev parent reply other threads:[~2011-08-24 7:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 6:10 [PATCH] bridge: Pseudo-header required for the checksum of ICMP6 header of MLD Ang Way Chuang
2011-08-24 7:18 ` Eric Dumazet [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-08-23 8:41 IPv6 multicast snooping behaviour on 2.6.39-rc2 and later Ang Way Chuang
2011-08-23 9:57 ` Eric Dumazet
2011-08-23 12:31 ` Ang Way Chuang
2011-08-23 13:10 ` Eric Dumazet
2011-08-23 14:04 ` Ang Way Chuang
2011-08-23 17:24 ` Ang Way Chuang
2011-08-24 4:56 ` [PATCH] bridge: Pseudo-header required for the checksum of ICMP6 header of MLD Ang Way Chuang
2011-08-24 5:06 ` 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=1314170307.4478.28.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=wcang79@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