diff mod_firewall/mod_firewall.lua @ 980:aeb11522a44f

mod_firewall: Fix variable name
author Kim Alvefur <zash@zash.se>
date Mon, 08 Apr 2013 22:26:52 +0200
parents 53e158e44a44
children 37af655ca575
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua	Mon Apr 08 17:03:34 2013 +0200
+++ b/mod_firewall/mod_firewall.lua	Mon Apr 08 22:26:52 2013 +0200
@@ -176,9 +176,9 @@
 			state = nil;
 		elseif not(state) and line:match("^::") then
 			chain = line:gsub("^::%s*", "");
-			local chain_info = chains[chain_name];
+			local chain_info = chains[chain];
 			if not chain_info then
-				return nil, errmsg("Unknown chain: "..chain_name);
+				return nil, errmsg("Unknown chain: "..chain);
 			elseif chain_info.type ~= "event" then
 				return nil, errmsg("Only event chains supported at the moment");
 			end
@@ -334,7 +334,7 @@
 						for _, event_name in ipairs(chain_definition) do
 							module:hook(event_name, handler, chain_definition.priority);
 						end
-					elseif not chain_name:match("^user/") then
+					elseif not chain:match("^user/") then
 						module:log("warn", "Unknown chain %q", chain);
 					end
 					module:hook("firewall/chains/"..chain, handler);