rtl83xx: fix STP by trapping BPDUs

Fix Spanning Tree Protocol (STP) by changing COPY2CPU which currently
makes switch to ignore Bridge Protocol Data Units (BPDUs).

Tested on Zyxel GS1900-8, 24 and 48.

Signed-off-by: Rudolf Vesely <i@rudolfvesely.com>
[ improve commit description and add new line in different sections ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 41fcc617f9)
This commit is contained in:
Rudolf Vesely 2023-10-02 06:51:19 +00:00 committed by Hauke Mehrtens
parent 5b00873f5d
commit 83e681e69e
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ static void rtl83xx_vlan_setup(struct rtl838x_switch_priv *priv)
static void rtl83xx_setup_bpdu_traps(struct rtl838x_switch_priv *priv)
{
for (int i = 0; i < priv->cpu_port; i++)
priv->r->set_receive_management_action(i, BPDU, COPY2CPU);
priv->r->set_receive_management_action(i, BPDU, TRAP2CPU);
}
static void rtl83xx_port_set_salrn(struct rtl838x_switch_priv *priv,