Commit 81c1e8ba authored by Xavier Thompson's avatar Xavier Thompson

slapformat: Fix an idempotency issue

parent febaab8c
...@@ -1170,7 +1170,8 @@ class Interface(object): ...@@ -1170,7 +1170,8 @@ class Interface(object):
if dict_addr_netmask in interface_addr_list or \ if dict_addr_netmask in interface_addr_list or \
(tap and dict_addr_netmask in self.getGlobalScopeAddressList(tap=tap)): (tap and dict_addr_netmask in self.getGlobalScopeAddressList(tap=tap)):
# confirmed to be configured # confirmed to be configured
return dict_addr_netmask # return without len to keep format stable, as the first time len is not included
return dict_addr_netmask_without_len
if netmask == address_dict['netmask'] or \ if netmask == address_dict['netmask'] or \
(tap and lenNetmaskIpv6(netmask) == 128): (tap and lenNetmaskIpv6(netmask) == 128):
# same netmask, so there is a chance to add good one # same netmask, so there is a chance to add good one
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment