mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-25 21:13:40 +04:00
The RTL839x applies a port's isolation mask to every frame that came in on it, routed ones included. The driver leaves the port out of its own mask, so a route offloaded through a gateway behind the port a packet came in on, such as routing between two VLANs of one trunk, drops everything: the kernel shows the route as offloaded, and the drop counter PORT_ISOLATION counts each packet. Keep the port in its own mask, as the GPL SDK does at init (_dal_cypress_port_init_config() sets every port's mask to all ports). A broadcast is still not sent back out of the port it came in on. Only RTL839x changes; the other families keep their masks as they are. Tested on an HPE 1920-48G (RTL8393), with 10.99.1.0/24 routed from VLAN 7 to a gateway on VLAN 3, both behind lan48. On main, 0/8 echo requests reached the gateway, even with IPv4 forwarding on in the kernel. With this change and forwarding off, so that only the hardware path delivers, 8/8 arrived, TTL 63, from the switch MAC. Routing to a gateway behind lan47 still delivers 8/8. Two bursts of 50 broadcasts entering lan48 added nothing to its tx_BroadcastPkts, while the same entering lan47 added 50 and 53. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Gennaro Cimmino <gcimmino@rayonra.net> Link: https://github.com/openwrt/openwrt/pull/25764 Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>