diff options
author | Vladislav Grishenko <themiron@mail.ru> | 2020-09-13 05:02:57 +0500 |
---|---|---|
committer | Vladislav Grishenko <themiron@mail.ru> | 2020-09-13 05:03:43 +0500 |
commit | c8575ff09416c967aa6907b5b4e9b187d4a78d14 (patch) | |
tree | 75419e2a8c2ff407c9fe66e85c0c4859f84e583c | |
parent | 12d5a5290bb78cd262c420fd934cfb34017fb6c9 (diff) | |
download | accel-ppp-c8575ff09416c967aa6907b5b4e9b187d4a78d14.tar.gz accel-ppp-c8575ff09416c967aa6907b5b4e9b187d4a78d14.zip |
shaper: fix support for Mikrotik-Rate-Limit with bursts
-rw-r--r-- | accel-pppd/shaper/shaper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/shaper/shaper.c b/accel-pppd/shaper/shaper.c index 660901f..351a7ee 100644 --- a/accel-pppd/shaper/shaper.c +++ b/accel-pppd/shaper/shaper.c @@ -238,7 +238,7 @@ static int parse_string_simple(const char *str, int dir, int *speed, int *burst, val = parse_integer(endptr + 1, &endptr, &mult); } - if (*endptr == '\0') { + if (*endptr == '\0' || isblank(*endptr)) { *speed = conf_multiplier * mult * val; return 0; } else if (*endptr == '/' || *endptr == '\\' || *endptr == ':') { @@ -247,7 +247,7 @@ static int parse_string_simple(const char *str, int dir, int *speed, int *burst, return 0; } else { val = parse_integer(endptr + 1, &endptr, &mult); - if (*endptr == '\0') { + if (*endptr == '\0' || isblank(*endptr)) { *speed = conf_multiplier * mult * val; return 0; } |