Skip to content

Commit

Permalink
ndb.objects.interface: relax altnames check
Browse files Browse the repository at this point in the history
Don't be strict on the interface rename
  • Loading branch information
svinota committed Feb 21, 2024
1 parent 228b3b2 commit fc899cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyroute2/ndb/objects/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit fc899cb

Please sign in to comment.