Commit eb05aab5 authored by David Stevens's avatar David Stevens Committed by David S. Miller

[IPV6]: Fix header length calculation in multicast input.

It did not account for extension headers properly.  If we get
this length wrong, we do not determine if a multicast packet
is MLDv1 vs. MLDv2 correctly.
parent a7a339c0
......@@ -1017,7 +1017,9 @@ int igmp6_event_query(struct sk_buff *skb)
if (!pskb_may_pull(skb, sizeof(struct in6_addr)))
return -EINVAL;
len = ntohs(skb->nh.ipv6h->payload_len);
/* compute payload length excluding extension headers */
len = ntohs(skb->nh.ipv6h->payload_len) + sizeof(struct ipv6hdr);
len -= (char *)skb->h.raw - (char *)skb->nh.ipv6h;
/* Drop queries with not link local source */
if (!(ipv6_addr_type(&skb->nh.ipv6h->saddr)&IPV6_ADDR_LINKLOCAL))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment