Opened 5 months ago

Closed 4 months ago

#30687 closed enhancement (fixed)

Implement a generic counter token bucket

Reported by: dgoulet Owned by:
Priority: Medium Milestone: Tor: 0.4.2.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: asn-merge
Cc: Actual Points:
Parent ID: #15516 Points: 0.1
Reviewer: nickm Sponsor: Sponsor27-must

Description

We have the _raw_t interface and a _rw_t specialized one. Many use cases only need a single counter like for instance the circuit creation DoS defense would use that. Or #15516 introduce2 rate limiting.

After a discussion with nickm, it would be wise if we can simply implement a generic counter token bucket:

token_bucket_ctr_t

... with a single bucket in it and thus could generically be used by many subsystems.

Child Tickets

Change History (9)

comment:1 Changed 5 months ago by dgoulet

Reviewer: nickm
Status: newneeds_review

comment:2 Changed 5 months ago by nickm

Looks mostly good, but CI is failing with compilation warnings.

comment:3 Changed 5 months ago by nickm

Status: needs_reviewneeds_revision

comment:4 Changed 5 months ago by dgoulet

Status: needs_revisionneeds_review

Made the fixes. CI is running but so far so good.

comment:5 Changed 5 months ago by nickm

Status: needs_reviewmerge_ready

CI passes, code lgtm. Let's take it in 0.4.2.

comment:6 Changed 5 months ago by dgoulet

Keywords: asn-merge added

Reminder: 042 merge window not open yet.

comment:7 Changed 4 months ago by asn

Status: merge_readyneeds_revision

Missing a changes file.

comment:8 Changed 4 months ago by dgoulet

Status: needs_revisionmerge_ready

Pushed

comment:9 Changed 4 months ago by asn

Resolution: fixed
Status: merge_readyclosed

Merged to 042.

Note: See TracTickets for help on using tickets.