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

Captive Portal per-user bandwidth input validation fix. Issue #9311 #4322

Merged
merged 1 commit into from
Jun 10, 2020

Conversation

vktg
Copy link
Contributor

@vktg vktg commented May 21, 2020

From redmine:

I have two routers running on 2.4.4-RELEASE-p2 (amd64) and they have radically different configurations-- one with about 25 active users and the other around 1200 active users. I just took the following steps on both routers to confirm that it's still a problem here:

  1. Confirmed in Status/Traffic Graph that several users are exceeding 5M Bits/Sec (some are over 150M Bits/Sec)
  2. In Captive Portal profile, Checked "Enabled per-user bandwidth restriction" and set "Default download" to 5000 (left Default upload blank), then saved
  3. Confirmed in Status/Traffic Graph that all users' bandwidth has been limited to 5M (confirmed, the top users are sitting at 5)
  4. Returned to the Captive Portal profile and Un-Checked "Enabled per-user bandwidth restriction" without clearing the "Default download" blank, then saved
  5. Looked in Status/Traffic Graph to see that all users are still being limited to 5M Bits/Sec
  6. Returned to the Captive Portal profile, Checked "Enabled per-user bandwidth restriction", then cleared "Default download" blank, then saved
  7. In Status/Traffic Graph, users are no longer being restricted (some are over 150M Bits/Sec)

This fix clears <bwdefaultdn> and <bwdefaultup> if <peruserbw> is disabled,
otherwise these values used in

} else if (!empty($config['captiveportal'][$cpzone]['bwdefaultup'])) {

and
} else if (!empty($config['captiveportal'][$cpzone]['bwdefaultdn'])) {

@vktg vktg force-pushed the captivedisableperuserbw branch from ac8f41c to 183964b Compare May 21, 2020 16:21
@netgate-git-updates netgate-git-updates merged commit 71d6bb9 into pfsense:master Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants