mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
tc: check for errors in gen_rate_estimator creation
The functions gen_new_estimator and gen_replace_estimator can return errors, but they were being ignored. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0e991ec6a0
commit
71bcb09a57
6 changed files with 97 additions and 41 deletions
|
@ -880,9 +880,12 @@ static int qdisc_change(struct Qdisc *sch, struct nlattr **tca)
|
|||
sch->stab = stab;
|
||||
|
||||
if (tca[TCA_RATE])
|
||||
/* NB: ignores errors from replace_estimator
|
||||
because change can't be undone. */
|
||||
gen_replace_estimator(&sch->bstats, &sch->rate_est,
|
||||
qdisc_root_sleeping_lock(sch),
|
||||
tca[TCA_RATE]);
|
||||
qdisc_root_sleeping_lock(sch),
|
||||
tca[TCA_RATE]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue