bridge: Add a flag to control unicast packet flood.
Add a flag to control flood of unicast traffic. By default, flood is on and the bridge will flood unicast traffic if it doesn't know the destination. When the flag is turned off, unicast traffic without an FDB will not be forwarded to the specified port. Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

کامیت شده توسط
David S. Miller

والد
9ba18891f7
کامیت
867a59436f
@@ -58,10 +58,10 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
skb_pull(skb, ETH_HLEN);
|
||||
|
||||
if (is_broadcast_ether_addr(dest))
|
||||
br_flood_deliver(br, skb);
|
||||
br_flood_deliver(br, skb, false);
|
||||
else if (is_multicast_ether_addr(dest)) {
|
||||
if (unlikely(netpoll_tx_running(dev))) {
|
||||
br_flood_deliver(br, skb);
|
||||
br_flood_deliver(br, skb, false);
|
||||
goto out;
|
||||
}
|
||||
if (br_multicast_rcv(br, NULL, skb)) {
|
||||
@@ -73,11 +73,11 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
if (mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb))
|
||||
br_multicast_deliver(mdst, skb);
|
||||
else
|
||||
br_flood_deliver(br, skb);
|
||||
br_flood_deliver(br, skb, false);
|
||||
} else if ((dst = __br_fdb_get(br, dest, vid)) != NULL)
|
||||
br_deliver(dst->dst, skb);
|
||||
else
|
||||
br_flood_deliver(br, skb);
|
||||
br_flood_deliver(br, skb, true);
|
||||
|
||||
out:
|
||||
rcu_read_unlock();
|
||||
|
مرجع در شماره جدید
Block a user