Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rate_limit: Set initialized flag of SieveLru when loading yaml is done #11181

Merged
merged 1 commit into from Mar 31, 2024

Conversation

masaori335
Copy link
Contributor

The rate_limit plugin keep saying "no IP reputation" with any config. It looks like the SieveLru::_initialized flag never be true.

DIAG: <sni_limiter.cc:126 (sni_limit_cont)> (rate_limit) CLIENT_HELLO on localhost, no IP reputation

@masaori335 masaori335 added the rate_limit rate_limit plugin label Mar 22, 2024
@masaori335 masaori335 added this to the 10.1.0 milestone Mar 22, 2024
@masaori335 masaori335 requested a review from zwoop March 22, 2024 07:31
@masaori335 masaori335 self-assigned this Mar 22, 2024
@@ -135,6 +135,8 @@ SieveLru::parseYaml(const YAML::Node &node)
Dbg(dbg_ctl, "\twith perma-block rule: %s(%u, %u, %ld)", _name.c_str(), _permablock_limit, _permablock_threshold,
static_cast<long>(_permablock_max_age.count()));

_initialized = true;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zwoop is this good place to set the flag? if any better place you imagined, let me know.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeh, this feels right.

@masaori335
Copy link
Contributor Author

[approve ci autest]

@masaori335 masaori335 merged commit 996291d into apache:master Mar 31, 2024
15 checks passed
@cmcfarlen cmcfarlen modified the milestones: 10.1.0, 10.0.0 Apr 2, 2024
@cmcfarlen
Copy link
Contributor

Cherry-picked to 10.0.0

cmcfarlen pushed a commit that referenced this pull request Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rate_limit rate_limit plugin
Projects
Status: picked-10.0.0
Development

Successfully merging this pull request may close these issues.

None yet

4 participants