From: Linus Lüssing Date: Tue, 15 Feb 2011 13:19:18 +0000 (+0000) Subject: bridge: Fix IPv6 multicast snooping by correcting offset in MLDv2 report X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=649e984d00416cb1a254fdbebd6d3f9fa01c32fa;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git bridge: Fix IPv6 multicast snooping by correcting offset in MLDv2 report We actually want a pointer to the grec_nsrcr and not the following field. Otherwise we can get very high values for *nsrcs as the first two bytes of the IPv6 multicast address are being used instead, leading to a failing pskb_may_pull() which results in MLDv2 reports not being parsed. Signed-off-by: Linus Lüssing Signed-off-by: David S. Miller --- diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 17708fccf1ee..d69beaf83627 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -1013,7 +1013,7 @@ static int br_ip6_multicast_mld2_report(struct net_bridge *br, nsrcs = skb_header_pointer(skb, len + offsetof(struct mld2_grec, - grec_mca), + grec_nsrcs), sizeof(_nsrcs), &_nsrcs); if (!nsrcs) return -EINVAL;