diff --git a/daemon/core/nodes/base.py b/daemon/core/nodes/base.py index 7f444480..cea1e81b 100644 --- a/daemon/core/nodes/base.py +++ b/daemon/core/nodes/base.py @@ -1050,8 +1050,9 @@ class CoreNetworkBase(NodeBase): if uni: unidirectional = 1 + mac = str(iface.mac) if iface.mac else None iface2_data = InterfaceData( - id=linked_node.get_iface_id(iface), name=iface.name, mac=str(iface.mac) + id=linked_node.get_iface_id(iface), name=iface.name, mac=mac ) ip4 = iface.get_ip4() if ip4: diff --git a/daemon/core/nodes/network.py b/daemon/core/nodes/network.py index a55de4cf..58c1e195 100644 --- a/daemon/core/nodes/network.py +++ b/daemon/core/nodes/network.py @@ -875,8 +875,9 @@ class PtpNet(CoreNetwork): if iface1.getparams() != iface2.getparams(): unidirectional = 1 + mac = str(iface1.mac) if iface1.mac else None iface1_data = InterfaceData( - id=iface1.node.get_iface_id(iface1), name=iface1.name, mac=str(iface1.mac) + id=iface1.node.get_iface_id(iface1), name=iface1.name, mac=mac ) ip4 = iface1.get_ip4() if ip4: @@ -887,8 +888,9 @@ class PtpNet(CoreNetwork): iface1_data.ip6 = str(ip6.ip) iface1_data.ip6_mask = ip6.prefixlen + mac = str(iface2.mac) if iface2.mac else None iface2_data = InterfaceData( - id=iface2.node.get_iface_id(iface2), name=iface2.name, mac=str(iface2.mac) + id=iface2.node.get_iface_id(iface2), name=iface2.name, mac=mac ) ip4 = iface2.get_ip4() if ip4: