htb: fix misplaced memset() overwriting already set htb prio option
Reported by Richard Cesar <spidla@spidlas.cz>
This commit is contained in:
parent
cc9ae9b34b
commit
4be7adbb71
1 changed files with 2 additions and 2 deletions
|
@ -217,12 +217,12 @@ static int htb_class_msg_fill(struct rtnl_tc *tc, void *data,
|
|||
if (!htb || !(htb->ch_mask & SCH_HTB_HAS_RATE))
|
||||
BUG();
|
||||
|
||||
memset(&opts, 0, sizeof(opts));
|
||||
|
||||
/* if not set, zero (0) is used as priority */
|
||||
if (htb->ch_mask & SCH_HTB_HAS_PRIO)
|
||||
opts.prio = htb->ch_prio;
|
||||
|
||||
memset(&opts, 0, sizeof(opts));
|
||||
|
||||
mtu = rtnl_tc_get_mtu(tc);
|
||||
|
||||
rtnl_tc_build_rate_table(tc, &htb->ch_rate, rtable);
|
||||
|
|
Loading…
Add table
Reference in a new issue