From 12586e4e784f4ea8bb34b3015d2dc4c58358e9d1 Mon Sep 17 00:00:00 2001 From: lostcontrol Date: Wed, 23 Feb 2005 16:53:03 +0000 Subject: [PATCH] - Increment "crtRuleNbr" after the creation of the rule git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@69 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- firewall/ipfw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firewall/ipfw.py b/firewall/ipfw.py index 4e3e8f57..79fe7c66 100644 --- a/firewall/ipfw.py +++ b/firewall/ipfw.py @@ -52,8 +52,8 @@ class Ipfw(Firewall): def banIP(self, ip): """ Returns query to ban IP. """ - self.crtRuleNbr = self.crtRuleNbr + 1 query = "ipfw -q add "+`self.crtRuleNbr`+" deny ip from "+ip+" to any" + self.crtRuleNbr = self.crtRuleNbr + 1 return query def unBanIP(self, ip):