Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Use device network section for STP on OpenWrt > 21 #123 #126

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

pandafy
Copy link
Member

@pandafy pandafy commented Sep 21, 2023

Fixes #123

txqueuelen = 1000,
type = "bridge",
up = true
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the test expecting stp as true even though is not defined here?
Is the code assuming STP is turned on by default? That is not the case https://openwrt.org/docs/guide-user/base-system/basic-networking.

Copy link
Member Author

@pandafy pandafy Sep 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was following the existing code here. I will update the test to check for multiple scenarios.

elseif arg[1] == 'network' and arg[3] == 'stp' then
return '1'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ubus:call('network.interface', 'dump', {}) command does not return the STP status.

It is fetched by another call uci_cursor.get('network', interface['interface'], 'stp') on OpenWrr < 21.

On OpenWrt >= 21, we loop over all the device sections and get the STP value for the bridge

@nemesifier nemesifier merged commit 003adb8 into master Sep 28, 2023
2 checks passed
@nemesifier nemesifier deleted the issues/123-stp branch September 28, 2023 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] Spanning Tree Status shown incorrectly
2 participants