aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.h
diff options
context:
space:
mode:
authorNardi Ivan <nardi.ivan@gmail.com>2022-11-07 18:38:40 +0100
committerToni <matzeton@googlemail.com>2022-11-07 20:36:55 +0100
commit52b562c3280e8592c6a5452659a1cb4cffe26177 (patch)
tree0ca14056ad3c2876d27b559a570df08ca3434abb /example/reader_util.h
parent9e73d61fb0454a143dea6faa4a665c6b7875e195 (diff)
Fix json export of ipv6 addresses
The "string" buffer was to short; better start using `INET6_ADDRSTRLEN` as reported in the man page of `inet_ntop`. Close: #1794
Diffstat (limited to 'example/reader_util.h')
-rw-r--r--example/reader_util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/example/reader_util.h b/example/reader_util.h
index d8c02c8b6..6d343551e 100644
--- a/example/reader_util.h
+++ b/example/reader_util.h
@@ -182,7 +182,7 @@ typedef struct ndpi_flow_info {
u_int16_t vlan_id;
ndpi_packet_tunnel tunnel_type;
struct ndpi_flow_struct *ndpi_flow;
- char src_name[48], dst_name[48];
+ char src_name[INET6_ADDRSTRLEN], dst_name[INET6_ADDRSTRLEN];
u_int8_t ip_version;
u_int32_t cwr_count, src2dst_cwr_count, dst2src_cwr_count;
u_int32_t ece_count, src2dst_ece_count, dst2src_ece_count;