bridge: add a missing ntohs()
authorEric Dumazet <eric.dumazet@gmail.com>
Tue, 20 Apr 2010 03:20:05 +0000 (03:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Apr 2010 01:51:57 +0000 (18:51 -0700)
grec_nsrcs is in network order, we should convert to host horder in
br_multicast_igmp3_report()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_multicast.c

index f29ada827a6acfe04afd7e3752724013ac58c27f..386c15369d91ed7e59b109dd1cbe7bdab5e1780a 100644 (file)
@@ -727,7 +727,7 @@ static int br_multicast_igmp3_report(struct net_bridge *br,
                group = grec->grec_mca;
                type = grec->grec_type;
 
-               len += grec->grec_nsrcs * 4;
+               len += ntohs(grec->grec_nsrcs) * 4;
                if (!pskb_may_pull(skb, len))
                        return -EINVAL;