From efe246e39492909e2a7e9ee2454478aabf377dab Mon Sep 17 00:00:00 2001 From: JDierkse Date: Mon, 14 Jun 2021 15:56:07 +0200 Subject: [PATCH] Fix having interfaces without RTA_OIF --- net-dhcp/interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net-dhcp/interface.py b/net-dhcp/interface.py index b0f67d0..f7af6fa 100644 --- a/net-dhcp/interface.py +++ b/net-dhcp/interface.py @@ -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 = {}