[bridge STP] potential syntax error -> last_member_interval

  • Master 4.19.93 on mvebu with DSA
  • iproute2-ss5.4.0-1-openwrt
  • ip-bridge 5.4.0-1
  • swconfig not installed
  • kmod-swconfig 4.19.93-1 installed as dependency to kmod-switch-mvsw61xx

Enabling STP on the bridge I am observing the same as previously reported

Since a search in the public domain does not unearth any hints

it would appear somewhat particular to OpenWrt or else it would likely have popped up somewhere else already.

errno 34 produces

ERANGE 34 Result not representable

and does not shed much light on the matter either.

Perusing the OpenWrt source code for to set attribute turns up [1]

nl_perror(-retval, "Failed to set attribute");

but that files pertains to the swconfig package which is not installed though.

Bit of an enigma what this error represents and how to remedy it.
__
[1] https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/network/config/swconfig/src/cli.c;hb=99dd2709b855baa9e68c7c7106743a7c4a91ee0c#l341

Hey!,
From what i gathered when I was facing that issue was that it was related with STP, what it was I have no idea. However, it seems to work fine with that error message, but of course, it isn't supposed to. I hope some openwrt developer can shed a light on this.

Seems that bridge attributes are set through

enum bridge_opt [2]

and if

matches

BRIDGE_OPT_LAST_MEMBER_INTERVAL = (1 << 6),

it would presumably be caused by that value set as

cfg->last_member_interval = 100; [3]

How that jibes with

is not clear - a numerical misrepresentation?

Also not clear whether netfid leverages any userland, e.g. ip | bridge | brctl for managing STP attributes with the kernel.


[2] https://git.openwrt.org/?p=project/netifd.git;a=blob;f=system.h;hb=70b50118c7b063fab5c1383f12e6e92ca0fc82c3#l99
[3] https://git.openwrt.org/?p=project/netifd.git;a=blob;f=bridge.c;hb=70b50118c7b063fab5c1383f12e6e92ca0fc82c3#l576

Might be a an actual code misrepresentation [bug], iproute2 (kernel ?) [4] would seem to expect

mcast_last_member_interval

[4] https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/tree/ip/iplink_bridge.c#n53

Really?

The user's remedy was 1 post underneath the two you quoted:

For those trying to follow/assist you, can you note if you have WiFi PHYs added to the bridge?

It would be quite helpful.

Oh no, please do not start spreading your nonsense all over again which contributes zero to the subject.

Turning STP off is a workaround but a not a solution to an apparent bug.
And it is completely unrelated to Wlan, i.e. whether a Wlan iface gets enslaved into the bridge or not.

Thank you for answering, it help me read the code and slide bits you posted.

And you are the first person that said wlan uses STP; but ok.

Again thanks, and I'd appreciate it if you stop the "spreading nonsense" and not a workaround mess. Nobody suggested as much. Kinda tiring getting your disrespect. I'm following because I see this problem too. Please make the threads helpful for everyone, not just yourself. Thanks.

EDIT: With that said, it would also help if you gave the exact OpenWrt version, as I built estimating from your software list - to flash a friend's to test. It's kinda hard guessing what you're running.

Well, in that case, it would be nice for some openwrt developer to help you sort this out

Wifi can also use STP, in some situations it is helpful.

If you build from the last trunk with DSA enabled and configured this bug applies.

2 Likes

Is this being looked into? Found this error printed in the logs with:

{"kernel":"5.4.50","hostname":"OpenWrt","system":"ARMv7 Processor rev 1 (v7l)","model":"Turris Omnia","board_name":"cznic,turris-omnia","release":{"distribution":"OpenWrt","version":"SNAPSHOT","revision":"r13692-556eb9872d","target":"mvebu/cortexa9","description":"OpenWrt SNAPSHOT r13692-556eb9872d"}}