Fix having interfaces without RTA_OIF

This commit is contained in:
2021-06-14 15:56:07 +02:00
parent 01c39a1700
commit efe246e394
+1 -1
View File
@@ -93,7 +93,7 @@ class Interface:
self.routes = []
for r in iproute.get_routes():
attrs = dict(r['attrs'])
if attrs['RTA_OIF'] == self['index']:
if 'RTA_OIF' in attrs and attrs['RTA_OIF'] == self['index']:
if 'RTA_PRIORITY' in attrs and not attrs['RTA_PRIORITY'] < 255:
continue
route = {}