equalitie / swabber

Simple pubsub-based IP banning engine
7 stars 4 forks source link

Race condition when setting iptables rules (before iptables 1.4.20) #15

Open nosmo opened 8 years ago

nosmo commented 8 years ago

Almost certainly happens when two commands are run at the same time. This can be solved either by adding limited retry to the objects or reintroducing the use of the iptables_lock object as was used when the iptc module was the recommended ban/unban method.

swabber (30706) 2015-12-09 09:51:23,193: ERROR Uncaught exception in cleaner! failed to unban IP [REDACTED] iptables: Resource temporarily unavailable. command iptables -D INPUT -s [REDACTED] -j DROP -m comment --comment "swabber:[TIMESTAMP]" -i eth+

nosmo commented 8 years ago

Hopefully addressed in https://github.com/equalitie/swabber/commit/5e92463c85d181c9c2f31673af0ac02999807036