mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-18 23:31:47 +00:00
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.
This commit is contained in:
parent
a571587d0b
commit
cb4bd0ec8d
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user