daemon: fix convert interface grpc utility to properly get ip4/ip6 addresses
This commit is contained in:
parent
4f58d5d8eb
commit
3c8f6a9512
1 changed files with 2 additions and 2 deletions
|
@ -367,10 +367,10 @@ def convert_iface(iface: CoreInterface) -> core_pb2.Interface:
|
|||
"""
|
||||
ip4 = iface.get_ip4()
|
||||
ip4_mask = ip4.prefixlen if ip4 else None
|
||||
ip4 = str(ip4) if ip4 else None
|
||||
ip4 = str(ip4.ip) if ip4 else None
|
||||
ip6 = iface.get_ip6()
|
||||
ip6_mask = ip6.prefixlen if ip6 else None
|
||||
ip6 = str(ip6) if ip6 else None
|
||||
ip6 = str(ip6.ip) if ip6 else None
|
||||
mac = str(iface.mac) if iface.mac else None
|
||||
return core_pb2.Interface(
|
||||
id=iface.id,
|
||||
|
|
Loading…
Reference in a new issue