net_sched: use __TCA_HTB_MAX and TCA_HTB_MAX
Signed-off-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4315d834c1
commit
e18434c457
@@ -1302,14 +1302,14 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
|
|||||||
struct htb_class *cl = (struct htb_class *)*arg, *parent;
|
struct htb_class *cl = (struct htb_class *)*arg, *parent;
|
||||||
struct nlattr *opt = tca[TCA_OPTIONS];
|
struct nlattr *opt = tca[TCA_OPTIONS];
|
||||||
struct qdisc_rate_table *rtab = NULL, *ctab = NULL;
|
struct qdisc_rate_table *rtab = NULL, *ctab = NULL;
|
||||||
struct nlattr *tb[TCA_HTB_RTAB + 1];
|
struct nlattr *tb[__TCA_HTB_MAX];
|
||||||
struct tc_htb_opt *hopt;
|
struct tc_htb_opt *hopt;
|
||||||
|
|
||||||
/* extract all subattrs from opt attr */
|
/* extract all subattrs from opt attr */
|
||||||
if (!opt)
|
if (!opt)
|
||||||
goto failure;
|
goto failure;
|
||||||
|
|
||||||
err = nla_parse_nested(tb, TCA_HTB_RTAB, opt, htb_policy);
|
err = nla_parse_nested(tb, TCA_HTB_MAX, opt, htb_policy);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto failure;
|
goto failure;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user