aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>2010-04-25 04:59:07 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-26 14:25:31 -0400
commit4eb8b9031a0314539605733597b1e30222d4da70 (patch)
tree2d5db34c06d9876aef6a0531bf1e0f368c692cd4
parent93c0c8b4a5a174645550d444bd5c3ff0cccf74cb (diff)
bridge br_multicast: Ensure to initialize BR_INPUT_SKB_CB(skb)->mrouters_only.
Even with commit 32dec5dd0233ebffa9cae25ce7ba6daeb7df4467 ("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 snooping support is compiled and disabled, so we can see garbage. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/bridge/br_multicast.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 386c15369d91..eaa0e1bae49b 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -957,9 +957,6 @@ static int br_multicast_ipv4_rcv(struct net_bridge *br,
957 unsigned offset; 957 unsigned offset;
958 int err; 958 int err;
959 959
960 BR_INPUT_SKB_CB(skb)->igmp = 0;
961 BR_INPUT_SKB_CB(skb)->mrouters_only = 0;
962
963 /* We treat OOM as packet loss for now. */ 960 /* We treat OOM as packet loss for now. */
964 if (!pskb_may_pull(skb, sizeof(*iph))) 961 if (!pskb_may_pull(skb, sizeof(*iph)))
965 return -EINVAL; 962 return -EINVAL;
@@ -1049,6 +1046,9 @@ err_out:
1049int br_multicast_rcv(struct net_bridge *br, struct net_bridge_port *port, 1046int br_multicast_rcv(struct net_bridge *br, struct net_bridge_port *port,
1050 struct sk_buff *skb) 1047 struct sk_buff *skb)
1051{ 1048{
1049 BR_INPUT_SKB_CB(skb)->igmp = 0;
1050 BR_INPUT_SKB_CB(skb)->mrouters_only = 0;
1051
1052 if (br->multicast_disabled) 1052 if (br->multicast_disabled)
1053 return 0; 1053 return 0;
1054 1054