Fix for IPv6 address format across the various platforms/distributions
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user