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

openwrt/hotplug: Handle DSA switch port configs #164

Merged
merged 1 commit into from
Aug 22, 2023
Merged

Conversation

tohojo
Copy link
Owner

@tohojo tohojo commented Aug 21, 2023

In the OpenWrt hotplug script we handle the case where the interface hotplug event arrives for the bridge interface by querying uci to find the underlying devices that are part of the bridge and restarting any configured SQM instances on the ports. However, with the switch to DSA, we can no longer find the bridge ports in the network.$INTERFACE.ifname property. Instead, we have to query the 'device' property and locate the separate device config section to find the port names.

Add a function to do this querying, but keep the ifname query to retain compatibility with old configs (it's harmless if the parameter is empty).

Fixes #163

In the OpenWrt hotplug script we handle the case where the interface hotplug
event arrives for the bridge interface by querying uci to find the underlying
devices that are part of the bridge and restarting any configured SQM instances
on the ports. However, with the switch to DSA, we can no longer find the bridge
ports in the network.$INTERFACE.ifname property. Instead, we have to query the
'device' property and locate the separate device config section to find the port
names.

Add a function to do this querying, but keep the ifname query to retain
compatibility with old configs (it's harmless if the parameter is empty).

Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
@tohojo tohojo merged commit 82b5d14 into master Aug 22, 2023
@tohojo tohojo deleted the openwrt-device branch August 22, 2023 10:10
@@ -1,6 +1,29 @@
#!/bin.sh
Copy link

Choose a reason for hiding this comment

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

should this be #!/bin/sh ?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Oops, yeah - nice catch, thanks! :)

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.

sqm-hotplug: 'ifname' replaced by 'device'
2 participants