mirror of
https://github.com/openNDS/openNDS.git
synced 2026-05-04 03:01:32 -04:00
Fix - Typo making calculation of ul/dl rates incorrect.
Allowed rates were 4 times higher than configured. Signed-off-by: Rob White <rob@blue-wave.net>
This commit is contained in:
@@ -888,7 +888,7 @@ iptables_download_ratelimit_enable(t_client *client, int enable)
|
||||
int rc = 0;
|
||||
unsigned long long int packets;
|
||||
|
||||
packets = (client->download_rate * 1000 / 1500) / 2;
|
||||
packets = (client->download_rate * 1000 / 1500) / 8;
|
||||
|
||||
if (enable == 1) {
|
||||
debug(LOG_INFO, "Download Rate Limiting [%s] [%s] to [%llu] packets per second", client->ip, client->mac, packets);
|
||||
@@ -945,7 +945,7 @@ iptables_upload_ratelimit_enable(t_client *client, int enable)
|
||||
int rc = 0;
|
||||
unsigned long long int packets;
|
||||
|
||||
packets = (client->upload_rate * 1000 / 1500) / 2;
|
||||
packets = (client->upload_rate * 1000 / 1500) / 8;
|
||||
|
||||
if (enable == 1) {
|
||||
debug(LOG_INFO, "Upload Rate Limiting [%s] [%s] to [%llu] packets per second", client->ip, client->mac, packets);
|
||||
|
||||
Reference in New Issue
Block a user