mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
bridge: Pseudo-header required for the checksum of ICMPv6
Checksum of ICMPv6 is not properly computed because the pseudo header is not used. Thus, the MLD packet gets dropped by the bridge. Signed-off-by: Zheng Yan <[email protected]> Reported-by: Ang Way Chuang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
e05c4ad3ed
commit
4b275d7efa
1 changed files with 10 additions and 3 deletions
|
|
@ -1520,16 +1520,23 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
|
|||
err = pskb_trim_rcsum(skb2, len);
|
||||
if (err)
|
||||
goto out;
|
||||
err = -EINVAL;
|
||||
}
|
||||
|
||||
ip6h = ipv6_hdr(skb2);
|
||||
|
||||
switch (skb2->ip_summed) {
|
||||
case CHECKSUM_COMPLETE:
|
||||
if (!csum_fold(skb2->csum))
|
||||
if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, skb2->len,
|
||||
IPPROTO_ICMPV6, skb2->csum))
|
||||
break;
|
||||
/*FALLTHROUGH*/
|
||||
case CHECKSUM_NONE:
|
||||
skb2->csum = 0;
|
||||
if (skb_checksum_complete(skb2))
|
||||
skb2->csum = ~csum_unfold(csum_ipv6_magic(&ip6h->saddr,
|
||||
&ip6h->daddr,
|
||||
skb2->len,
|
||||
IPPROTO_ICMPV6, 0));
|
||||
if (__skb_checksum_complete(skb2))
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue