Skip to content

Commit

Permalink
bridge: Fix IPv6 multicast snooping by correcting offset in MLDv2 report
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
T-X authored and davem330 committed Feb 22, 2011
1 parent 9cc6e0c commit 649e984
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bridge/br_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 649e984

Please sign in to comment.