From fc899cbfb5c7127d90c7e4af8d3bd9f5c178a7dd Mon Sep 17 00:00:00 2001 From: Peter Saveliev Date: Wed, 21 Feb 2024 10:05:17 +0100 Subject: [PATCH] ndb.objects.interface: relax altnames check Don't be strict on the interface rename --- pyroute2/ndb/objects/interface.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyroute2/ndb/objects/interface.py b/pyroute2/ndb/objects/interface.py index 06328689b..bab0382f3 100644 --- a/pyroute2/ndb/objects/interface.py +++ b/pyroute2/ndb/objects/interface.py @@ -992,7 +992,10 @@ def apply_altnames(self, alt_ifname_setup): ) self.load_from_system() self.load_sql(set_state=False) - if set(self['alt_ifname_list']) != alt_ifname_setup: + if ( + 'ifname' not in self.changed + and set(self['alt_ifname_list']) != alt_ifname_setup + ): raise Exception('could not setup alt ifnames') @check_auth('obj:modify')