mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-23 23:47:48 +04:00
The RTL839x route dump reads a ROUTING row back with otto_l3_839x_nexthop_read(), which fills a whole route to hand over a gateway MAC and a switch MAC entry. Read DMAC entries back the way they are written instead: get_dmac() fills the struct otto_l3_dmac that set_dmac() takes. RTL839x decodes the gateway MAC and SW_MAC_IDX from the row; RTL930x reads the MAC from its egress MAC table and leaves smac_id at 0, since its egress interfaces name the source MAC. A read that fails returns its error, and the dump prints "-" for it. Only the RTL839x dump uses it; nothing else changes. On an HPE 1920-48G (RTL8393) it reads back the gateway MAC with MAC_ID 1 for a route out of a device with a MAC of its own, and 0 for one out of the switch MAC. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Gennaro Cimmino <gcimmino@rayonra.net> Link: https://github.com/openwrt/openwrt/pull/25852 Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>