diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2015-01-13 10:52:56 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2015-01-13 10:52:56 +0300 |
commit | a836c882df2cb28d327fc93c5d30b968ca3ee1b0 (patch) | |
tree | 5ed7453080ee2df4a492dfbe23ce1cc578ecc5ee /accel-pppd | |
parent | 9db65ee7acc0e4a42c30250e728ab656e5a4c61a (diff) | |
download | accel-ppp-a836c882df2cb28d327fc93c5d30b968ca3ee1b0.tar.gz accel-ppp-a836c882df2cb28d327fc93c5d30b968ca3ee1b0.zip |
shaper: fixed parsing ecn/noecn for fq_codel
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/shaper/leaf_qdisc.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/accel-pppd/shaper/leaf_qdisc.c b/accel-pppd/shaper/leaf_qdisc.c index d6b29583..ef558533 100644 --- a/accel-pppd/shaper/leaf_qdisc.c +++ b/accel-pppd/shaper/leaf_qdisc.c @@ -167,8 +167,15 @@ static int parse_fq_codel(char *str) while (1) { for (ptr1 = str + 1; *ptr1 && *ptr1 != ' '; ptr1++); - if (!*ptr1) - return -1; + if (!*ptr1) { + if (strcmp(str, "ecn") == 0) + conf_lq_arg6 = 1; + else if (strcmp(str, "noecn") == 0) + conf_lq_arg6 = 0; + else + return -1; + break; + } *ptr1 = 0; @@ -199,10 +206,6 @@ static int parse_fq_codel(char *str) } else if (strcmp(str, "interval") == 0) { if (parse_time(ptr1, &conf_lq_arg5)) return -1; - } else if (strcmp(str, "ecn") == 0) { - conf_lq_arg6 = 1; - } else if (strcmp(str, "noecn") == 0) { - conf_lq_arg6 = 0; } else return -1; |