diff options
Diffstat (limited to 'examples/py-flow-dashboard/flow-dash.py')
-rwxr-xr-x | examples/py-flow-dashboard/flow-dash.py | 5 |
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: |