aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorLinus Lüssing <linus.luessing@web.de>2011-02-15 08:19:18 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-22 13:07:26 -0500
commit649e984d00416cb1a254fdbebd6d3f9fa01c32fa (patch)
treef55db589cf188c833680f64622a6baee407e78ca /net/bridge
parent9cc6e0c4c457f84bedcfb04e7dd58a36909c4ef7 (diff)
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 <linus.luessing@web.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_multicast.c2
1 files changed, 1 insertions, 1 deletions
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,
1013 1013
1014 nsrcs = skb_header_pointer(skb, 1014 nsrcs = skb_header_pointer(skb,
1015 len + offsetof(struct mld2_grec, 1015 len + offsetof(struct mld2_grec,
1016 grec_mca), 1016 grec_nsrcs),
1017 sizeof(_nsrcs), &_nsrcs); 1017 sizeof(_nsrcs), &_nsrcs);
1018 if (!nsrcs) 1018 if (!nsrcs)
1019 return -EINVAL; 1019 return -EINVAL;