Commit 06ebfdb7 authored by Jondy Zhao's avatar Jondy Zhao Committed by Marco Mariani

Fix ipv4 netmask error when run slapformat in the Cygwin

parent 0c552d82
......@@ -844,8 +844,8 @@ class Interface(object):
def addIPv4LocalAddress(self, addr=None):
"""Adds local IPv4 address in ipv4_local_network"""
netmask = self.ipv4_local_network if sys.platform == 'cygwin' \
else '255.255.255.255'
netmask = str(netaddr.IPNetwork(self.ipv4_local_network).netmask) \
if sys.platform == 'cygwin' else '255.255.255.255'
local_address_list = self.getIPv4LocalAddressList()
if addr is None:
return self._generateRandomIPv4Address(netmask)
......
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