Trying the build a mesh based extenstion to my network as I do not have cables where I would need them. Therefore configured 2 devices as Mesh GW and 2 devices as Mesh STA. All devices are Netgear R7800 based and run OpenWrt SNAPSHOT r22545-457549665f / LuCI Master git-23.093.56957-2145121
The Mesh GWs are obviously wired into the "bigger" local network. The Mesh STAs are wired to a local connected device.
As this setup introduces the risk of looping (it will) I decided to activate STP on all bridges involved (so in in all 4 devices).
What I observe in this setup is that the STP messages (BPDUs) send over the wired interface (eth1.1) are handled correct resulting in the Mesh GWs to have the propper understanding of the STP root. However, the Mesh STA do receive the BPDUs over the mesh interface (mesh0) but seem not to act on these messages. tcpdump on the Mesh STA does show these messages but the Mesh STA remains convinced to be the root, which is wrong. In addition not mention of anything received in dmesg.
Currious whether this behaviour has been seen before and how it was solved (if solved, otherwise we might have an issue that needs to repaired).
I’m still not sure what you’re trying to achieve and not sure I understand you properly when you say gw and sta without more detail. But if you are talking about the 802.11s options, then they need to be set after the link is up. try installing the package mesh11sd which can automate this:
On the other hand, you can also incorporate batman-adv in your mesh which has a few quality of life options on top of the L2 bridging. In you case, that'd be gateway selection and built in bridge loop avoidance so you never have to mess with stp.
BATMAN looks like an interesting option. Need to give that a try.
In parallel I did some debugging on the STP procedure and noticed that BPDUs delivered over the mesh0 interface are being dropped in the kernel's LLC layer (net/llc/llc_input.c) while BPDUs delivered over the eth1.1 interface are properly handled. Did not discover yet why this happens.