Blob Blame History Raw
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Sun, 22 Mar 2020 13:58:50 -0700
Subject: net: dsa: Fix duplicate frames flooded by learning
Git-commit: 0e62f543bed03a64495bd2651d4fe1aa4bcb7fe5
Patch-mainline: 5.6
References: networking-stable-20_03_28

When both the switch and the bridge are learning about new addresses,
switch ports attached to the bridge would see duplicate ARP frames
because both entities would attempt to send them.

Fixes: 5037d532b83d ("net: dsa: add Broadcom tag RX/TX handler")
Reported-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 net/dsa/tag_brcm.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/net/dsa/tag_brcm.c
+++ b/net/dsa/tag_brcm.c
@@ -129,6 +129,8 @@ static struct sk_buff *brcm_tag_rcv(stru
 	/* Remove Broadcom tag and update checksum */
 	skb_pull_rcsum(skb, BRCM_TAG_LEN);
 
+	skb->offload_fwd_mark = 1;
+
 	/* Move the Ethernet DA and SA */
 	memmove(skb->data - ETH_HLEN,
 		skb->data - ETH_HLEN - BRCM_TAG_LEN,