Treat "avpkt 0" as illegal. It is used as a divisor, so # tc qdisc add dev lo root sfq redflowlimit 100000 avpkt 0 dies with a floating point exception. Fixes: 6987ecf0832d ("sfq: add optional RED on top of SFQ") Signed-off-by: Dave Seddon <dave…@gmail.com> --- tc/q_sfq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/q_sfq.c b/tc/q_sfq.c index 37ebd977..5ed1ad07 100644 --- a/tc/q_sfq.c +++ b/tc/q_sfq.c @@ -119,7 +119,7 @@ static int sfq_parse_opt(const struct qdisc_util *qu, int argc, char **argv, str red++; } else if (strcmp(*argv, "avpkt") == 0) { NEXT_ARG(); - if (get_size(&avpkt, *argv)) { + if (get_size(&avpkt, *argv) || !avpkt) { fprintf(stderr, "Illegal \"avpkt\"\n"); return -1; }
-- 2.56.0