update to setparams check to avoid python3 errors, and fix to ipprefix
This commit is contained in:
parent
40176e861d
commit
db9d13aff8
2 changed files with 5 additions and 2 deletions
|
@ -236,7 +236,7 @@ class IpPrefix(object):
|
|||
self.prefixlen = int(tmp[1])
|
||||
else:
|
||||
self.prefixlen = self.addrlen
|
||||
self.prefix = socket.inet_pton(self.af, tmp[0]).decode("ISO-8859-1")
|
||||
self.prefix = socket.inet_pton(self.af, tmp[0])
|
||||
if self.addrlen > self.prefixlen:
|
||||
addrbits = self.addrlen - self.prefixlen
|
||||
netmask = ((1 << self.prefixlen) - 1) << addrbits
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue