From 9579afb24e9c56c6fc4c89e2e99fe4b3de304200 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 3 Aug 2016 11:43:45 +0200 Subject: [PATCH] tc: Fix for missing estimator initialization When switching to C99 initializers, I forgot to add this one. This means that when trying to set an estimator value, tc would complain about spurious duplicate estimator parameter. But much worse, the random variable content is sent to the kernel regardless of whether an estimator was given or not. Fixes: d17b136f7d7dd ("Use C99 style initializers everywhere") Reported-by: Stas Nichiporovich Signed-off-by: Phil Sutter --- tc/tc_qdisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c index bc87aab1..93c9a4c1 100644 --- a/tc/tc_qdisc.c +++ b/tc/tc_qdisc.c @@ -45,7 +45,7 @@ static int usage(void) static int tc_qdisc_modify(int cmd, unsigned int flags, int argc, char **argv) { struct qdisc_util *q = NULL; - struct tc_estimator est; + struct tc_estimator est = {}; struct { struct tc_sizespec szopts; __u16 *data;