bridge: add a missing ntohs()
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>
This commit is contained in:
parent
e46754f8c9
commit
8eabf95cb1
|
@ -727,7 +727,7 @@ static int br_multicast_igmp3_report(struct net_bridge *br,
|
||||||
group = grec->grec_mca;
|
group = grec->grec_mca;
|
||||||
type = grec->grec_type;
|
type = grec->grec_type;
|
||||||
|
|
||||||
len += grec->grec_nsrcs * 4;
|
len += ntohs(grec->grec_nsrcs) * 4;
|
||||||
if (!pskb_may_pull(skb, len))
|
if (!pskb_may_pull(skb, len))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue