Skip to content

Commit e8a26b3

Browse files
committed
Upgrade pynetflow (support V9 Options Templates)
1 parent b11bfc4 commit e8a26b3

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

netflowwriter.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
sys.path.append(os.path.dirname(os.path.realpath(__file__)) + '/pynetflow')
2828
from pynetflow.netflow import parse_packet
2929
from pynetflow.netflow.utils import UnknownExportVersion
30-
from pynetflow.netflow.v9 import V9TemplateNotRecognized, V9OptionsTemplatesNotSupported
30+
from pynetflow.netflow.v9 import V9TemplateNotRecognized
3131

3232

3333
IS_DEBUG = os.environ.get('DEBUG', 'false') in ['true', 'yes', '1']
@@ -157,11 +157,6 @@ def process_named_pipe(named_pipe_filename):
157157
if client_ip in last_record_seqs:
158158
last_record_seqs[client_ip] += 1
159159
continue
160-
except V9OptionsTemplatesNotSupported as ex:
161-
log.debug(f"Skipping Options Data Record (Options Template parsing not supported)")
162-
if client_ip in last_record_seqs:
163-
last_record_seqs[client_ip] += 1
164-
continue
165160

166161
except Exception as ex:
167162
log.exception("Error writing line, skipping...")

0 commit comments

Comments
 (0)