diff mod_audit/mod_audit.lua @ 5706:655f90b149a4

mod_audit: Pass IP address in string form Passing an util.ip object to :text_tag() would be an error.
author Kim Alvefur <zash@zash.se>
date Mon, 13 Nov 2023 12:02:54 +0100
parents 9bbf5b0673a2
children 9a5fca9f90a6
line wrap: on
line diff
--- a/mod_audit/mod_audit.lua	Mon Nov 13 11:36:56 2023 +0100
+++ b/mod_audit/mod_audit.lua	Mon Nov 13 12:02:54 2023 +0100
@@ -88,7 +88,7 @@
 		if attach_ipv4_prefix or attach_ipv6_prefix then
 			network = get_ip_network(remote_ip);
 		end
-		stanza:text_tag("remote-ip", network or remote_ip);
+		stanza:text_tag("remote-ip", network or remote_ip.normal);
 	end
 	if attach_location and session.ip then
 		local remote_ip = ip.new_ip(session.ip);