Comparison

mod_audit/mod_audit.lua @ 5728:9bbf5b0673a2

mod_audit: Fix use of util.ip Yes, weirdly named 'new' function
author Kim Alvefur <zash@zash.se>
date Mon, 13 Nov 2023 11:36:56 +0100
parent 5351:c35f3c1762b5
child 5729:655f90b149a4
comparison
equal deleted inserted replaced
5727:ad5c77793750 5728:9bbf5b0673a2
89 network = get_ip_network(remote_ip); 89 network = get_ip_network(remote_ip);
90 end 90 end
91 stanza:text_tag("remote-ip", network or remote_ip); 91 stanza:text_tag("remote-ip", network or remote_ip);
92 end 92 end
93 if attach_location and session.ip then 93 if attach_location and session.ip then
94 local remote_ip = ip.new(session.ip); 94 local remote_ip = ip.new_ip(session.ip);
95 local geoip_country = ip.proto == "IPv6" and geoip6_country or geoip4_country; 95 local geoip_country = ip.proto == "IPv6" and geoip6_country or geoip4_country;
96 stanza:tag("location", { 96 stanza:tag("location", {
97 country = geoip_country:query_by_addr(remote_ip.normal); 97 country = geoip_country:query_by_addr(remote_ip.normal);
98 }):up(); 98 }):up();
99 end 99 end