diff options
-rw-r--r-- | net/bridge/br_multicast.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index fd96a8dc97f4..398221e81be5 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
@@ -49,22 +49,23 @@ static struct net_bridge_mdb_entry *__br_mdb_ip_get( | |||
49 | static struct net_bridge_mdb_entry *br_mdb_ip_get( | 49 | static struct net_bridge_mdb_entry *br_mdb_ip_get( |
50 | struct net_bridge_mdb_htable *mdb, __be32 dst) | 50 | struct net_bridge_mdb_htable *mdb, __be32 dst) |
51 | { | 51 | { |
52 | if (!mdb) | ||
53 | return NULL; | ||
54 | |||
52 | return __br_mdb_ip_get(mdb, dst, br_ip_hash(mdb, dst)); | 55 | return __br_mdb_ip_get(mdb, dst, br_ip_hash(mdb, dst)); |
53 | } | 56 | } |
54 | 57 | ||
55 | struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br, | 58 | struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br, |
56 | struct sk_buff *skb) | 59 | struct sk_buff *skb) |
57 | { | 60 | { |
58 | struct net_bridge_mdb_htable *mdb = br->mdb; | 61 | if (br->multicast_disabled) |
59 | |||
60 | if (!mdb || br->multicast_disabled) | ||
61 | return NULL; | 62 | return NULL; |
62 | 63 | ||
63 | switch (skb->protocol) { | 64 | switch (skb->protocol) { |
64 | case htons(ETH_P_IP): | 65 | case htons(ETH_P_IP): |
65 | if (BR_INPUT_SKB_CB(skb)->igmp) | 66 | if (BR_INPUT_SKB_CB(skb)->igmp) |
66 | break; | 67 | break; |
67 | return br_mdb_ip_get(mdb, ip_hdr(skb)->daddr); | 68 | return br_mdb_ip_get(br->mdb, ip_hdr(skb)->daddr); |
68 | } | 69 | } |
69 | 70 | ||
70 | return NULL; | 71 | return NULL; |