From c8575ff09416c967aa6907b5b4e9b187d4a78d14 Mon Sep 17 00:00:00 2001 From: Vladislav Grishenko Date: Sun, 13 Sep 2020 05:02:57 +0500 Subject: shaper: fix support for Mikrotik-Rate-Limit with bursts --- accel-pppd/shaper/shaper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'accel-pppd') diff --git a/accel-pppd/shaper/shaper.c b/accel-pppd/shaper/shaper.c index 660901f4..351a7ee1 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; } -- cgit v1.2.3