summaryrefslogtreecommitdiffstats
path: root/tc/q_gred.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-08-25 09:04:55 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-08-25 09:04:55 -0700
commitcb4bd0ec8dcba856d1ebf8b3f72b79f669dad0f4 (patch)
treeb6a12a8e6e3d18b41c030210e086ad57cc47581b /tc/q_gred.c
parenta571587d0b27a2c1492019c3abeb6fb0c0e606ce (diff)
Fix GRED options clearing
Bug reported where priorities of GRED DP's are ignored. The option parsing sets opt then memset was clearing these values.
Diffstat (limited to 'tc/q_gred.c')
-rw-r--r--tc/q_gred.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tc/q_gred.c b/tc/q_gred.c
index df4aa3d8..59651d36 100644
--- a/tc/q_gred.c
+++ b/tc/q_gred.c
@@ -51,7 +51,7 @@ static int init_gred(struct qdisc_util *qu, int argc, char **argv,
{
struct rtattr *tail;
- struct tc_gred_sopt opt;
+ struct tc_gred_sopt opt = { 0 };
int dps = 0;
int def_dp = -1;
@@ -83,7 +83,7 @@ static int init_gred(struct qdisc_util *qu, int argc, char **argv,
return -1;
}
} else if (strcmp(*argv, "grio") == 0) {
- opt.grio=1;
+ opt.grio = 1;
} else if (strcmp(*argv, "help") == 0) {
explain();
return -1;
@@ -100,7 +100,6 @@ static int init_gred(struct qdisc_util *qu, int argc, char **argv,
return -1;
}
- memset(&opt, 0, sizeof(struct tc_gred_sopt));
opt.DPs = dps;
opt.def_DP = def_dp;