Skip to content

Commit 72d6c78

Browse files
committed
Fix: sometimes ports are not available (Fortinet)
1 parent f61ee7b commit 72d6c78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

netflowwriter.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ def _get_data(buffer):
214214
f.data["IN_BYTES"],
215215
f.data["PROTOCOL"],
216216
f.data.get("DIRECTION", DIRECTION_INGRESS),
217-
f.data["L4_DST_PORT"],
218-
f.data["L4_SRC_PORT"],
217+
f.data.get("L4_DST_PORT", 0), # sometimes ports are not available: https://github.com/grafolean/grafolean/issues/13
218+
f.data.get("L4_SRC_PORT", 0),
219219
f.data["INPUT_SNMP"],
220220
f.data["OUTPUT_SNMP"],
221221
address_family,

0 commit comments

Comments
 (0)