updates to support 2/3 along with not using vcmd c extension

This commit is contained in:
bharnden 2019-06-02 19:06:25 -07:00
parent 864c7b69a1
commit ecc63f4abb
22 changed files with 680 additions and 636 deletions

View file

@ -855,11 +855,13 @@ class PtpNet(CoreNetwork):
if ipaddress.is_ipv4_address(ip):
family = AF_INET
ipl = socket.inet_pton(family, ip)
# ipl = ipl.decode("ISO-8859-1")
interface1_ip4 = ipaddress.IpAddress(af=family, address=ipl)
interface1_ip4_mask = mask
else:
family = AF_INET6
ipl = socket.inet_pton(family, ip)
# ipl = ipl.decode("ISO-8859-1")
interface1_ip6 = ipaddress.IpAddress(af=family, address=ipl)
interface1_ip6_mask = mask
@ -873,11 +875,13 @@ class PtpNet(CoreNetwork):
if ipaddress.is_ipv4_address(ip):
family = AF_INET
ipl = socket.inet_pton(family, ip)
# ipl = ipl.decode("ISO-8859-1")
interface2_ip4 = ipaddress.IpAddress(af=family, address=ipl)
interface2_ip4_mask = mask
else:
family = AF_INET6
ipl = socket.inet_pton(family, ip)
# ipl = ipl.decode("ISO-8859-1")
interface2_ip6 = ipaddress.IpAddress(af=family, address=ipl)
interface2_ip6_mask = mask