bridge: add missing vid to br_mdb_get()
Obviously, vid should be considered when searching for multicast group. Cc: Vlad Yasevich <vyasevic@redhat.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Acked-by: Vlad Yasevich <vyasevich@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c10cb5fc0f
commit
fbca58a224
@ -66,7 +66,7 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
goto out;
|
||||
}
|
||||
|
||||
mdst = br_mdb_get(br, skb);
|
||||
mdst = br_mdb_get(br, skb, vid);
|
||||
if (mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb))
|
||||
br_multicast_deliver(mdst, skb);
|
||||
else
|
||||
|
@ -97,7 +97,7 @@ int br_handle_frame_finish(struct sk_buff *skb)
|
||||
if (is_broadcast_ether_addr(dest))
|
||||
skb2 = skb;
|
||||
else if (is_multicast_ether_addr(dest)) {
|
||||
mdst = br_mdb_get(br, skb);
|
||||
mdst = br_mdb_get(br, skb, vid);
|
||||
if (mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb)) {
|
||||
if ((mdst && mdst->mglist) ||
|
||||
br_multicast_is_router(br))
|
||||
|
@ -132,7 +132,7 @@ static struct net_bridge_mdb_entry *br_mdb_ip6_get(
|
||||
#endif
|
||||
|
||||
struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br,
|
||||
struct sk_buff *skb)
|
||||
struct sk_buff *skb, u16 vid)
|
||||
{
|
||||
struct net_bridge_mdb_htable *mdb = rcu_dereference(br->mdb);
|
||||
struct br_ip ip;
|
||||
@ -144,6 +144,7 @@ struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br,
|
||||
return NULL;
|
||||
|
||||
ip.proto = skb->protocol;
|
||||
ip.vid = vid;
|
||||
|
||||
switch (skb->protocol) {
|
||||
case htons(ETH_P_IP):
|
||||
|
@ -442,7 +442,7 @@ extern int br_multicast_rcv(struct net_bridge *br,
|
||||
struct net_bridge_port *port,
|
||||
struct sk_buff *skb);
|
||||
extern struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br,
|
||||
struct sk_buff *skb);
|
||||
struct sk_buff *skb, u16 vid);
|
||||
extern void br_multicast_add_port(struct net_bridge_port *port);
|
||||
extern void br_multicast_del_port(struct net_bridge_port *port);
|
||||
extern void br_multicast_enable_port(struct net_bridge_port *port);
|
||||
@ -504,7 +504,7 @@ static inline int br_multicast_rcv(struct net_bridge *br,
|
||||
}
|
||||
|
||||
static inline struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br,
|
||||
struct sk_buff *skb)
|
||||
struct sk_buff *skb, u16 vid)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user