diff options
author | YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> | 2010-03-15 17:51:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-16 17:34:23 -0400 |
commit | 32dec5dd0233ebffa9cae25ce7ba6daeb7df4467 (patch) | |
tree | b086e355e9afa2cb6ab51988175afd619787029b /net/bridge/br_private.h | |
parent | 858a18a6a2f74e8f0e5b2e9671d4b74694aba708 (diff) |
bridge br_multicast: Don't refer to BR_INPUT_SKB_CB(skb)->mrouters_only without IGMP snooping.
Without CONFIG_BRIDGE_IGMP_SNOOPING,
BR_INPUT_SKB_CB(skb)->mrouters_only is not appropriately
initialized, so we can see garbage.
A clear option to fix this is to set it even without that
config, but we cannot optimize out the branch.
Let's introduce a macro that returns value of mrouters_only
and let it return 0 without CONFIG_BRIDGE_IGMP_SNOOPING.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_private.h')
-rw-r--r-- | net/bridge/br_private.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index bfb8feb310a6..846d7d1e2075 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h | |||
@@ -206,12 +206,20 @@ struct net_bridge | |||
206 | 206 | ||
207 | struct br_input_skb_cb { | 207 | struct br_input_skb_cb { |
208 | struct net_device *brdev; | 208 | struct net_device *brdev; |
209 | #ifdef CONFIG_BRIDGE_IGMP_SNOOPING | ||
209 | int igmp; | 210 | int igmp; |
210 | int mrouters_only; | 211 | int mrouters_only; |
212 | #endif | ||
211 | }; | 213 | }; |
212 | 214 | ||
213 | #define BR_INPUT_SKB_CB(__skb) ((struct br_input_skb_cb *)(__skb)->cb) | 215 | #define BR_INPUT_SKB_CB(__skb) ((struct br_input_skb_cb *)(__skb)->cb) |
214 | 216 | ||
217 | #ifdef CONFIG_BRIDGE_IGMP_SNOOPING | ||
218 | # define BR_INPUT_SKB_CB_MROUTERS_ONLY(__skb) (BR_INPUT_SKB_CB(__skb)->mrouters_only) | ||
219 | #else | ||
220 | # define BR_INPUT_SKB_CB_MROUTERS_ONLY(__skb) (0) | ||
221 | #endif | ||
222 | |||
215 | extern struct notifier_block br_device_notifier; | 223 | extern struct notifier_block br_device_notifier; |
216 | extern const u8 br_group_address[ETH_ALEN]; | 224 | extern const u8 br_group_address[ETH_ALEN]; |
217 | 225 | ||