Skip to content

Commit

Permalink
Merge pull request #571 from TiceDB/patch-2
Browse files Browse the repository at this point in the history
Point JSON field in_bytes to inBytes instead of inPackets
  • Loading branch information
phaag authored Oct 19, 2024
2 parents b96828f + b1d2a1f commit 4c8b892
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/output/output_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/output/output_ndjson.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
} // End of flow_record_to_ndjson

0 comments on commit 4c8b892

Please sign in to comment.