From: "Linus Lüssing" <linus.luessing@web.de>
To: bridge@lists.linux-foundation.org
Cc: "Stephen Hemminger" <shemminger@linux-foundation.org>,
"David Miller" <davem@davemloft.net>,
"YOSHIFUJI Hideaki" <yoshfuji@linux-ipv6.org>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
netdev@vger.kernel.org, "Linus Lüssing" <linus.luessing@web.de>
Subject: [PATCH] bridge: mcast snooping, fix IPv6 MLD checksum calculation
Date: Sun, 27 Mar 2011 08:27:23 +0200 [thread overview]
Message-ID: <1301207244-10428-2-git-send-email-linus.luessing@web.de> (raw)
In-Reply-To: <1301207244-10428-1-git-send-email-linus.luessing@web.de>
In contrast to IGMP, the MLDv1/2 message checksum needs to include an
IPv6 "pseudo-header" in the calculations (see RFC2710, section 3.3;
RFC3810, section 5.1.2).
The multicast snooping feature of the bridge code however did not take
this "pseudo-header" into consideration for the checksum validation when
parsing a snooped IPv6 MLDv1/2 message of another host, leading to
possibly ignored, though valid MLDv1/2 messages. This commit shall fix
this issue.
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
---
net/bridge/br_multicast.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index f61eb2e..47fae4f 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1525,7 +1525,10 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
break;
/*FALLTHROUGH*/
case CHECKSUM_NONE:
- skb2->csum = 0;
+ skb2->csum = ~csum_unfold(csum_ipv6_magic(&ip6h->saddr,
+ &ip6h->daddr,
+ skb2->len,
+ nexthdr, 0));
if (skb_checksum_complete(skb2))
goto out;
}
--
1.5.6.5
next prev parent reply other threads:[~2011-03-27 6:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-27 3:44 Checksumming bug in bridge multicast snooping for IPv6? Linus Lüssing
2011-03-27 6:27 ` bridge: mcast snooping, fixes for IPv6 MLDv1/2 parsing Linus Lüssing
2011-03-27 6:27 ` Linus Lüssing [this message]
2011-03-27 6:37 ` [PATCH] bridge: mcast snooping, fix IPv6 MLD checksum calculation Herbert Xu
2011-03-27 7:06 ` Linus Lüssing
2011-03-27 7:52 ` Herbert Xu
2011-03-30 9:29 ` David Miller
2011-03-27 6:27 ` [PATCH] bridge: mcast snooping, fix length check of snooped MLDv1/2 Linus Lüssing
2011-03-30 9:30 ` 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=1301207244-10428-2-git-send-email-linus.luessing@web.de \
--to=linus.luessing@web.de \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.org \
--cc=yoshfuji@linux-ipv6.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;
as well as URLs for NNTP newsgroup(s).