Skip to content

Commit 1565f60

Browse files
committed
poller/routes: added check for eos entries with protocol connected
In some cases we receive 0.0.0.0 as nexthopIps for an entry where the protocol is connected. In those cases the nexthopIps list must be empty Signed-off-by: AndryNick98 <[email protected]>
1 parent 49ee13a commit 1565f60

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

suzieq/poller/worker/services/routes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def _clean_eos_data(self, processed_data, _):
4848
entry['oifs'] = len(entry['nexthopIps']) * \
4949
['_nexthopVrf:default']
5050
entry['protocol'] = entry['protocol'].lower()
51+
if entry['protocol'] == 'connected':
52+
entry['nexthopIps'] = []
5153
entry['preference'] = int(entry.get('preference', 0))
5254
entry['metric'] = int(entry.get('metric', 0))
5355
self._fix_ipvers(entry)

0 commit comments

Comments
 (0)