Skip to content

Commit

Permalink
realtek: Fix failsafe mode
Browse files Browse the repository at this point in the history
The RTL8380-RTL9300 switches only forward packets when VLAN ID 1 is
configured. Do not use the standard failsafe configuration for DSA
accessing the default port directly, but configure a switch on the lan1
interface instead.

This will add the VLAN ID 1 configuration to the switch:
$ bridge vlan show
port              vlan-id
lan1              1 PVID Egress Untagged
switch            1 PVID Egress Untagged

Signed-off-by: Hauke Mehrtens <[email protected]>
(cherry picked from commit b7ee0786b56d1088c195fe7c1cdb1ad7d20c9245)
  • Loading branch information
hauke committed Jun 22, 2021
1 parent 7a5a247 commit 72d93c1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
set_preinit_iface() {

# Create a switch on lan1 to configure the VLAN 1.
# Without configuring VLAN ID 1 RTL8380 - RTL9300 will not
# forward packets.
ip link add name switch type bridge vlan_filtering 1
ip link set dev lan1 master switch
ip link set lan1 up

pi_ifname=switch
}

boot_hook_add preinit_main set_preinit_iface
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
remove_switch() {
# delete switch created in 05_set_preinit_iface_realtek again
ip link del name switch
}

boot_hook_add preinit_main remove_switch

0 comments on commit 72d93c1

Please sign in to comment.