aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'example/reader_util.c')
-rw-r--r--example/reader_util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/example/reader_util.c b/example/reader_util.c
index 3b78e0c52..6d90121d2 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -970,8 +970,12 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_DNS)) {
if(flow->ndpi_flow->protos.dns.rsp_type == 0x1)
inet_ntop(AF_INET, &flow->ndpi_flow->protos.dns.rsp_addr.ipv4, flow->info, sizeof(flow->info));
- else
+ else {
inet_ntop(AF_INET6, &flow->ndpi_flow->protos.dns.rsp_addr.ipv6, flow->info, sizeof(flow->info));
+
+ /* For consistency across platforms replace :0: with :: */
+ ndpi_patchIPv6Address(flow->info);
+ }
}
/* MDNS */
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_MDNS)) {