aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bridge/br_device.c')
-rw-r--r--net/bridge/br_device.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 91dffe7574d6..eb7062d2e9e5 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -25,6 +25,7 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
25 struct net_bridge *br = netdev_priv(dev); 25 struct net_bridge *br = netdev_priv(dev);
26 const unsigned char *dest = skb->data; 26 const unsigned char *dest = skb->data;
27 struct net_bridge_fdb_entry *dst; 27 struct net_bridge_fdb_entry *dst;
28 struct net_bridge_mdb_entry *mdst;
28 29
29 BR_INPUT_SKB_CB(skb)->brdev = dev; 30 BR_INPUT_SKB_CB(skb)->brdev = dev;
30 31
@@ -34,13 +35,21 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
34 skb_reset_mac_header(skb); 35 skb_reset_mac_header(skb);
35 skb_pull(skb, ETH_HLEN); 36 skb_pull(skb, ETH_HLEN);
36 37
37 if (dest[0] & 1) 38 if (dest[0] & 1) {
38 br_flood_deliver(br, skb); 39 if (br_multicast_rcv(br, NULL, skb))
39 else if ((dst = __br_fdb_get(br, dest)) != NULL) 40 goto out;
41
42 mdst = br_mdb_get(br, skb);
43 if (mdst || BR_INPUT_SKB_CB(skb)->mrouters_only)
44 br_multicast_deliver(mdst, skb);
45 else
46 br_flood_deliver(br, skb);
47 } else if ((dst = __br_fdb_get(br, dest)) != NULL)
40 br_deliver(dst->dst, skb); 48 br_deliver(dst->dst, skb);
41 else 49 else
42 br_flood_deliver(br, skb); 50 br_flood_deliver(br, skb);
43 51
52out:
44 return NETDEV_TX_OK; 53 return NETDEV_TX_OK;
45} 54}
46 55