Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33340
b: refs/heads/master
c: 1c7628b
h: refs/heads/master
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Aug 14, 2006
1 parent 68d6b19 commit d882539
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 97c802a113989800430a981b6f36b14c62163d37
refs/heads/master: 1c7628bd7a458faf7c96ef521f6d3a5ea9b106b8
11 changes: 4 additions & 7 deletions trunk/net/ipv4/netfilter/ipt_hashlimit.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,15 +454,12 @@ hashlimit_match(const struct sk_buff *skb,
dh->rateinfo.credit_cap = user2credits(hinfo->cfg.avg *
hinfo->cfg.burst);
dh->rateinfo.cost = user2credits(hinfo->cfg.avg);

spin_unlock_bh(&hinfo->lock);
return 1;
} else {
/* update expiration timeout */
dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire);
rateinfo_recalc(dh, now);
}

/* update expiration timeout */
dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire);

rateinfo_recalc(dh, now);
if (dh->rateinfo.credit >= dh->rateinfo.cost) {
/* We're underlimit. */
dh->rateinfo.credit -= dh->rateinfo.cost;
Expand Down

0 comments on commit d882539

Please sign in to comment.