Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132145
b: refs/heads/master
c: a883bf5
h: refs/heads/master
i:
  132143: 79a2385
v: v3
  • Loading branch information
Jarek Poplawski authored and David S. Miller committed Mar 5, 2009
1 parent 79ae59c commit f1a9bd2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9f8ac0b7b063be77f0de7a27fe5e6a0aa2cce58d
refs/heads/master: a883bf564ea555447a76682bb2d8d4bc92e23e0e
13 changes: 6 additions & 7 deletions trunk/net/sched/act_police.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,6 @@ static int tcf_act_police_locate(struct nlattr *nla, struct nlattr *est,
if (R_tab == NULL)
goto failure;

if (!est && (ret == ACT_P_CREATED ||
!gen_estimator_active(&police->tcf_bstats,
&police->tcf_rate_est))) {
err = -EINVAL;
goto failure;
}

if (parm->peakrate.rate) {
P_tab = qdisc_get_rtab(&parm->peakrate,
tb[TCA_POLICE_PEAKRATE]);
Expand All @@ -205,6 +198,12 @@ static int tcf_act_police_locate(struct nlattr *nla, struct nlattr *est,
&police->tcf_lock, est);
if (err)
goto failure_unlock;
} else if (tb[TCA_POLICE_AVRATE] &&
(ret == ACT_P_CREATED ||
!gen_estimator_active(&police->tcf_bstats,
&police->tcf_rate_est))) {
err = -EINVAL;
goto failure_unlock;
}

/* No failure allowed after this point */
Expand Down

0 comments on commit f1a9bd2

Please sign in to comment.