From b1d2a1f3a885aca4257d73797634cf4a94e50fce Mon Sep 17 00:00:00 2001 From: Thijs den Braver Date: Fri, 18 Oct 2024 09:56:43 +0200 Subject: [PATCH] Point JSON field in_bytes to inBytes instead of inPackets --- src/output/output_json.c | 4 ++-- src/output/output_ndjson.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/output/output_json.c b/src/output/output_json.c index 2e105ed7..f379cadf 100644 --- a/src/output/output_json.c +++ b/src/output/output_json.c @@ -149,7 +149,7 @@ static char *stringEXgenericFlow(char *streamPtr, void *extensionRecord) { streamPtr += len; AddElementU64("in_packets", genericFlow->inPackets); - AddElementU64("in_bytes", genericFlow->inPackets); + AddElementU64("in_bytes", genericFlow->inBytes); if (genericFlow->proto == IPPROTO_ICMP || genericFlow->proto == IPPROTO_ICMPV6) { // ICMP AddElementU32("proto", (uint32_t)genericFlow->proto); @@ -964,4 +964,4 @@ void flow_record_to_json(FILE *stream, recordHandle_t *recordHandle, int tag) { fputs(streamBuff, stream); -} // End of flow_record_to_json \ No newline at end of file +} // End of flow_record_to_json diff --git a/src/output/output_ndjson.c b/src/output/output_ndjson.c index 362a08a7..2d7ec1f6 100644 --- a/src/output/output_ndjson.c +++ b/src/output/output_ndjson.c @@ -137,7 +137,7 @@ static char *stringEXgenericFlow(char *streamPtr, void *extensionRecord) { streamPtr += len; AddElementU64("in_packets", genericFlow->inPackets); - AddElementU64("in_bytes", genericFlow->inPackets); + AddElementU64("in_bytes", genericFlow->inBytes); if (genericFlow->proto == IPPROTO_ICMP || genericFlow->proto == IPPROTO_ICMPV6) { // ICMP AddElementU32("proto", (uint32_t)genericFlow->proto); @@ -942,4 +942,4 @@ void flow_record_to_ndjson(FILE *stream, recordHandle_t *recordHandle, int tag) fputs(streamBuff, stream); -} // End of flow_record_to_ndjson \ No newline at end of file +} // End of flow_record_to_ndjson