Skip to content

Commit

Permalink
bridge br_multicast: Ensure to initialize BR_INPUT_SKB_CB(skb)->mrout…
Browse files Browse the repository at this point in the history
…ers_only.

Even with commit 32dec5d ("bridge
br_multicast: Don't refer to BR_INPUT_SKB_CB(skb)->mrouters_only
without IGMP snooping."), BR_INPUT_SKB_CB(skb)->mrouters_only is
not appropriately initialized if IGMP/MLD snooping support is
compiled and disabled, so we can see garbage.

Signed-off-by: YOSHIFUJI Hideaki <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
yoshfuji authored and davem330 committed Apr 26, 2010
1 parent 4a4771a commit 1fafc7a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions net/bridge/br_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -1340,9 +1340,6 @@ static int br_multicast_ipv4_rcv(struct net_bridge *br,
unsigned offset;
int err;

BR_INPUT_SKB_CB(skb)->igmp = 0;
BR_INPUT_SKB_CB(skb)->mrouters_only = 0;

/* We treat OOM as packet loss for now. */
if (!pskb_may_pull(skb, sizeof(*iph)))
return -EINVAL;
Expand Down Expand Up @@ -1440,9 +1437,6 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
unsigned offset;
int err;

BR_INPUT_SKB_CB(skb)->igmp = 0;
BR_INPUT_SKB_CB(skb)->mrouters_only = 0;

if (!pskb_may_pull(skb, sizeof(*ip6h)))
return -EINVAL;

Expand Down Expand Up @@ -1550,6 +1544,9 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
int br_multicast_rcv(struct net_bridge *br, struct net_bridge_port *port,
struct sk_buff *skb)
{
BR_INPUT_SKB_CB(skb)->igmp = 0;
BR_INPUT_SKB_CB(skb)->mrouters_only = 0;

if (br->multicast_disabled)
return 0;

Expand Down

0 comments on commit 1fafc7a

Please sign in to comment.