mirror of
https://github.com/f00b4r0/uspot.git
synced 2026-04-26 06:35:54 +03:00
[GH-ISSUE #25] Support traffic caps #16
Labels
No labels
bug
enhancement
invalid
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uspot#16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @f00b4r0 on GitHub (May 10, 2025).
Original GitHub issue: https://github.com/f00b4r0/uspot/issues/25
Originally assigned to: @f00b4r0 on GitHub.
Once traffic accounting is implemented (see #9), uspot should support RADIUS-driven per-user data caps through the following attributes
• ChilliSpot-Max-Total-Octets
• ChilliSpot-Max-Total-Gigawords
@PWJW commented on GitHub (Jun 15, 2025):
Is it possible to support the three attributes, so that we can set a limit for download/upload or both?
ChilliSpot-Max-Total-Octets
ChilliSpot-Max-Input-Octets
ChilliSpot-Max-Output-Octets
Thanks!
@f00b4r0 commented on GitHub (Jun 15, 2025):
Yes, + related 'Gigawords' attributes ;)
@f00b4r0 commented on GitHub (Jun 17, 2025):
Pushed new (untested) code to the ebpf branch, feedback welcome.
Any combination of the Chillispot-Max-* attributes should work.
@PWJW commented on GitHub (Jun 17, 2025):
Great, I will test today 👍
@PWJW commented on GitHub (Jun 20, 2025):
I have some feedback on the traffic limiting:
It is working, but only when I comment out the following 4 lines of code in uspot.uc, i.e.:
I see two potential issues:
let countersseems to be returning 0, even though it's set in the config file, anduspot clientscorrectly shows the counters, and radius interim accounting with input/output octets is present.if (!(+maxdown || +maxup || +maxtotal))looks like be checking if ANY of these attributes are not present. But it shouldn't do, as normally, you either set just a download cap, upload cap or total cap. i.e. not all 3 attributes are sent in the Access-Accept, it could be one or two.With these lines commented out as per above, the client limit is set, and enforced. It kicks me off correctly.
Also, the debug log doesn't seem to print the quota limit values it to the log:
should
tx rxbe the actual values set or just that label?Thanks!
@f00b4r0 commented on GitHub (Jun 20, 2025):
Thanks for testing. Please send further comments to PR #28 for easier tracking (since these comments relate directly to the PR)
That's because of a typo in the assignment above (counters = device, obviously wrong). I just fixed that.
This however makes no sense to me, can you test again with the last update?
Fixed
No, it checks if all are not present: 'not(A or B or C)' is equivalent to '(not(A) and not(B) and not(C))'
i.e. it checks if ALL are missing and is the same as
if (!+maxdown && !+maxup && !+maxtotal)it's just the label: it says the limits are enforced for both tx and rx. I reworded the debug output to make that clearer.
@PWJW commented on GitHub (Jun 20, 2025):
Oh, also, can we add some extra info to
uspot clientsto show any rx/tx limits active (if present), i.e.: