2/3 fixes for ip address and mac byte handling
This commit is contained in:
parent
db9d13aff8
commit
bb5e68ad8b
4 changed files with 10 additions and 25 deletions
|
@ -1063,13 +1063,11 @@ class CoreNetworkBase(NodeBase):
|
|||
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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue