changeset 6553:7f3ad8a5b2ab

mod_firewall: FROM COUNTRY: Fix incorrect variable use in generated code
author Matthew Wild <mwild1@gmail.com>
date Sun, 24 May 2026 19:30:31 +0100
parents d4da95d6d977
children 0002c727e918
files mod_firewall/mod_firewall.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua	Sun May 24 19:15:21 2026 +0100
+++ b/mod_firewall/mod_firewall.lua	Sun May 24 19:30:31 2026 +0100
@@ -300,12 +300,12 @@
 		return "--";
 	end
 	if ip.proto == "IPv6" and geov6 then
-		local geoinfo = geoinfo:query_by_addr6(ip.addr);
+		local geoinfo = geov6:query_by_addr6(ip.addr);
 		if geoinfo then
 			return geoinfo[what or "code"];
 		end
 	elseif ip.proto == "IPv4" and geov4 then
-		local geoinfo = geoinfo:query_by_addr(ip.addr);
+		local geoinfo = geov4:query_by_addr(ip.addr);
 		if geoinfo then
 			return geoinfo[what or "code"];
 		end