I've run into a weird problem with the normal br-lan bridge on mt7621 routers (xiaomi redmi ac2100). I'm using the master branch of openwrt as of a few days ago, so the new dsa drivers. The switch involved is a mt7530.
I set up a "simple" batman mesh config between two of these routers, on interface bat0. If I use a wifi 802.11s link (the bat_mesh0 interface) inside bat0 to communicate between the two nodes, all is well.
If I use an ethernet link (a cable) (the bat_eth interface) between the two nodes instead, I can still ping from one node to the other node. In other words I can ssh from a laptop into one node, and then ping the other node fine. But if I try to ping directly from that same laptop, I can ping the first node it is connected to, but I can not ping the other node! The bridge interface on the node is not bridging traffic between the bridged wifi ap and the bat0 lan interface.
This works fine on other hardware, like ath79 units I've tested, even on the master branch, so it's something with the mt7621/mt7530 drivers I think. Ideas?
Here's my /etc/config/network. (It's basically the same for both nodes, just different IPs.) Nothing else like wireless or firewall is different from stock default.
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdb0:42d0:69f2::/48'
option packet_steering '1'
config interface 'lan'
option type 'bridge'
option ifname 'bat0 lan3 lan4'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option gateway '192.168.2.1'
option stp '1'
option ipaddr '192.168.2.2'
option dns '192.168.2.1'
config interface 'bat0'
option proto 'batadv'
option routing_algo 'BATMAN_IV'
option aggregated_ogms '1'
option ap_isolation '0'
option bonding '0'
option fragmentation '1'
option gw_mode 'off'
option log_level '0'
option orig_interval '1000'
option bridge_loop_avoidance '1'
option distributed_arp_table '1'
option multicast_mode '1'
option network_coding '0'
option hop_penalty '10'
option isolation_mark '0x00000000/0x00000000'
config interface 'bat_mesh0'
option mtu '2304'
option proto 'batadv_hardif'
option master 'bat0'
config interface 'wan'
option ifname 'wan'
option proto 'dhcp'
config interface 'wan6'
option ifname 'wan'
option proto 'dhcpv6'
config device
option name 'lan1'
option mtu '1560'
config device
option name 'lan2'
option mtu '1560'
config device
option name 'eth0'
option mtu '1560'
config interface 'bat_eth'
option mtu '1560'
option proto 'batadv_hardif'
option master 'bat0'
option ifname 'lan1'
config interface 'bat_eth2'
option mtu '1560'
option proto 'batadv_hardif'
option master 'bat0'
option ifname 'lan2'
Right, I know. I was able to solve that issue using a few magic lines of code adjusting the mt7530 registers. But that can be for another thread.
I get the same issue of the bridge not bridging even when not doing any mtu / jumbo frame settings, and no special code to enable them in firmware.
It gets weirder.
If I ping 192.168.2.2 from a computer attached to the lan1 interface (on the bridge) of 192.168.2.1, I can get arp requests/replies through just fine. (arping works fine.) But the ip pings don't work, except right after an arp! So if I'm arping while pinging, many pings get through. If I'm not arping, and clear the arp cache on the computer, the first ping gets through and back, because an arp request is sent and returned just before the ip ping. But then no other pings get through until every 40s later when the next arp request/reply is sent!
tcpdump shows that the pings make it to 192.168.2.2 and a reply is generated fine, and it gets back to 192.168.2.1 on the bat0 and the br-lan interface, but does not get seen on the lan1 interface. Why?!
And arps do not get through (or pings) coming in from a computer on wlan (also on the bridge). An arp reply is generated from 192.168.2.2 and gets back to 192.168.2.1 on bat0/br-lan but is not sent out on the wlan interface.
Something seems to be broken about whether the bridge thinks it needs to forward packets to wlan/lan from the bat0/lan interface. bat0/wlan interface (wireless mesh) works fine, remember.
And it's printed whenever I ask that packets go over ethernet through batman.
It seems to be related to switch flow offloading? I'm not sure what this offload_fwd_mark is for.
Ideas anyone?