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

make banip ban immediately instead of just adding a registered failure #31

Closed
yarikoptic opened this issue Jan 13, 2012 · 5 comments
Closed

Comments

@yarikoptic
Copy link
Member

@yarikoptic yarikoptic commented Jan 13, 2012

ATM banip command is directed to the corresponding filter which adds a failure, thus banip command must be issued "maxretry" times for ban to occur.

It should instead ban immediately, probably by manufacturing corresponding ticket and providing it to BanManager (didn't look myself yet either current design allows for that). (Sure thing there is easier solution -- just to loop for MaxRetry times, but imho that is not ideal ;) )

@leeclemens
Copy link
Contributor

@leeclemens leeclemens commented Jan 13, 2012

hmm, that's a weird issue to have...definitely should be fixed ;)

@troex
Copy link

@troex troex commented Mar 12, 2012

+1

@voidzero
Copy link

@voidzero voidzero commented Apr 14, 2012

Yeah, this sounds like a good plan... is it easy to implement?

@creffett
Copy link
Contributor

@creffett creffett commented May 1, 2012

A hack to make this work would be to change the self.failManager.addFailure line to:
for i in xrange(self.failManager.getMaxRetry()):
self.failManager.addFailure(FailTicket(ip, unixTime))

It sets enough failures to cause a ban. Would probably be better to just add a ban, but this should work fine. Tested and works on my homebox.

@yarikoptic
Copy link
Member Author

@yarikoptic yarikoptic commented May 1, 2012

Mind sending a pull request?

@yarikoptic yarikoptic closed this in 958aa2e May 1, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants