aboutsummaryrefslogtreecommitdiff
path: root/pythonmod/pythonmod_utils.c
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2022-10-16 19:24:20 +0000
committerCy Schubert <cy@FreeBSD.org>2022-10-16 19:24:20 +0000
commit643f9a0581e8aac7eb790ced1164748939829826 (patch)
tree426d366252d838c8c61b439342ab32eccd181425 /pythonmod/pythonmod_utils.c
parent0dde6f4f8e604df8c6fbdab8b4aadb5ddf80c76f (diff)
Diffstat (limited to 'pythonmod/pythonmod_utils.c')
-rw-r--r--pythonmod/pythonmod_utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pythonmod/pythonmod_utils.c b/pythonmod/pythonmod_utils.c
index 1f6f2512918f..aebe4d2bbb24 100644
--- a/pythonmod/pythonmod_utils.c
+++ b/pythonmod/pythonmod_utils.c
@@ -172,14 +172,14 @@ int createResponse(struct module_qstate* qstate, sldns_buffer* pkt)
}
-/* Convert reply->addr to string */
+/* Convert reply->client_addr to string */
void reply_addr2str(struct comm_reply* reply, char* dest, int maxlen)
{
- int af = (int)((struct sockaddr_in*) &(reply->addr))->sin_family;
- void* sinaddr = &((struct sockaddr_in*) &(reply->addr))->sin_addr;
+ int af = (int)((struct sockaddr_in*) &(reply->client_addr))->sin_family;
+ void* sinaddr = &((struct sockaddr_in*) &(reply->client_addr))->sin_addr;
if(af == AF_INET6)
- sinaddr = &((struct sockaddr_in6*)&(reply->addr))->sin6_addr;
+ sinaddr = &((struct sockaddr_in6*)&(reply->client_addr))->sin6_addr;
dest[0] = 0;
if (inet_ntop(af, sinaddr, dest, (socklen_t)maxlen) == 0)
return;