]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
tc: Fix for missing estimator initialization
authorPhil Sutter <phil@nwl.cc>
Wed, 3 Aug 2016 09:43:45 +0000 (11:43 +0200)
committerStephen Hemminger <shemming@brocade.com>
Sat, 6 Aug 2016 17:14:06 +0000 (10:14 -0700)
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 <stasn77@gmail.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
tc/tc_qdisc.c

index bc87aab110e4852515db847f7ad2f37f5ea11262..93c9a4c1daa287b32b5e64b4f13a6217f4cd824c 100644 (file)
@@ -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;