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

ffda-wireless-rate-limiter: add package #133

Merged

Conversation

blocktrron
Copy link
Member

This adds a package which can be used to shape traffic on the wireless interfaces interface-wide or per-client.

Copy link
Member

@maurerle maurerle left a comment

Choose a reason for hiding this comment

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

So this depends on installation of https://github.com/blocktrron/wireless-rate-limiter
Using PKG_SOURCE_URL as explained here: https://openwrt.org/docs/guide-developer/packages
Did not know about this feature before.

If this is configured through the gluon uci section, I would like to have this compatible with the other ingress limit?
https://github.com/freifunk-gluon/gluon/wiki/Commandline-administration#limit-bandwidth-gluon-v20191
Or is there a reason to name things up and down instead of the established ingress and egress option and enabled instead of disabled as a config option?

The package TITLE seems to be copy-pasted from somewhere else and is not correct?

Other than that it looks good!

end

-- Decide daemon necessity
uci:set('wireless-rate-limiter', 'core', 'disabled', limits_applied and 0 or 1)
Copy link
Member

Choose a reason for hiding this comment

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

what does this and 0 or 1 do?
Looks like debug config to hard enforce/disable?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is just the elvis operator, you can negate the varname of limits_applied but i see this as more readable.

@blocktrron
Copy link
Member Author

I would like to have this compatible with the other ingress limit?

There is nothing to keep compatible, given they touch completely different areas and needs.

Or is there a reason to name things up and down instead of the established ingress and egress option

Different package, so we don't need to be in style. Furthermore this does not limit the egress / ingress traffic on the interface but the rate towards the client, which is a per-station and not per-iface limit for the client-case.

enabled instead of disabled

The disabled case when missing is equivalent to a False value. Chage to disabled and to retain the same logic the case would disable if the key is missing. Have a look at how this is handled for wifi-radios and wifi-interfaces on OpenWrt.

It makes sense from a yes / no standpoint if displayed in a UI, but this is just the flag for ignoring said section --> missing equals 0.

This adds a package which can be used to shape traffic on the wireless
interfaces interface-wide or per-client.

Signed-off-by: David Bauer <mail@david-bauer.net>
@blocktrron blocktrron merged commit c966f97 into freifunk-gluon:master Aug 29, 2024
2 checks passed
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.

2 participants