From 0fd59f060e97b558cf0fdd905817945b782845aa Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Mon, 15 Aug 2022 22:55:19 +0200 Subject: Split `*_l4_payload_len' into `*_src_l4_payload_len' and `*_dst_l4_payload_len'. Signed-off-by: Toni Uhlig --- examples/py-flow-dashboard/flow-dash.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples/py-flow-dashboard/flow-dash.py') 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: -- cgit v1.2.3