netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bridge: Fix IGMP3 report parsing
@ 2010-04-08  1:26 Herbert Xu
  2010-04-08  3:52 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Herbert Xu @ 2010-04-08  1:26 UTC (permalink / raw)
  To: David S. Miller, netdev; +Cc: Banyeer

Hi:

bridge: Fix IGMP3 report parsing

The IGMP3 report parsing is looking at the wrong address for
group records.  This patch fixes it.

Reported-by: Banyeer <banyeer@yahoo.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 6980625..5f0acfd 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -719,11 +719,11 @@ static int br_multicast_igmp3_report(struct net_bridge *br,
 	len = sizeof(*ih);
 
 	for (i = 0; i < num; i++) {
+		grec = (void *)(skb->data + len);
 		len += sizeof(*grec);
 		if (!pskb_may_pull(skb, len))
 			return -EINVAL;
 
-		grec = (void *)(skb->data + len);
 		group = grec->grec_mca;
 		type = grec->grec_type;
 

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-08  4:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-08  1:26 bridge: Fix IGMP3 report parsing Herbert Xu
2010-04-08  3:52 ` David Miller
2010-04-08  4:07   ` Herbert Xu
2010-04-08  4:21     ` David Miller

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).