aboutsummaryrefslogtreecommitdiff
path: root/examples/py-flow-dashboard/flow-dash.py
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2022-08-15 22:55:19 +0200
committerToni Uhlig <matzeton@googlemail.com>2022-08-15 22:55:19 +0200
commit0fd59f060e97b558cf0fdd905817945b782845aa (patch)
treeb41969e5503856d8abdd8d3302c960d36eddd454 /examples/py-flow-dashboard/flow-dash.py
parent905545487d9f44970fe36b75de467f8b6f78302a (diff)
Split `*_l4_payload_len' into `*_src_l4_payload_len' and `*_dst_l4_payload_len'.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/py-flow-dashboard/flow-dash.py')
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/py-flow-dashboard/flow-dash.py b/examples/py-flow-dashboard/flow-dash.py
index 2ac825cac..f2135735d 100755
--- a/examples/py-flow-dashboard/flow-dash.py
+++ b/examples/py-flow-dashboard/flow-dash.py
@@ -96,8 +96,9 @@ def nDPIsrvd_worker_onJsonLineRecvd(json_dict, instance, current_flow, global_us
if current_flow.flow_key != flow_key:
return False
- if 'flow_tot_l4_payload_len' in json_dict:
- shared_flow_dict[flow_key]['total-l4-bytes'] = json_dict['flow_tot_l4_payload_len']
+ if 'flow_src_tot_l4_payload_len' in json_dict and 'flow_dst_tot_l4_payload_len' in json_dict:
+ shared_flow_dict[flow_key]['total-l4-bytes'] = json_dict['flow_src_tot_l4_payload_len'] + \
+ json_dict['flow_dst_tot_l4_payload_len']
if 'midstream' in json_dict and json_dict['midstream'] != 0:
if shared_flow_dict[flow_key]['is_midstream'] is False: