mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-04 16:33:49 +08:00
fix(GRA-995): fix for update node address check
This commit is contained in:
@@ -92,13 +92,15 @@ func (a *ApiNode) ConvertToServerNode(currentNode *Node) *Node {
|
||||
if err == nil {
|
||||
convertedNode.InternetGateway = udpAddr
|
||||
}
|
||||
_, addr, err := net.ParseCIDR(a.Address)
|
||||
ip, addr, err := net.ParseCIDR(a.Address)
|
||||
if err == nil {
|
||||
convertedNode.Address = *addr
|
||||
convertedNode.Address.IP = ip
|
||||
}
|
||||
_, addr6, err := net.ParseCIDR(a.Address6)
|
||||
ip6, addr6, err := net.ParseCIDR(a.Address6)
|
||||
if err == nil {
|
||||
convertedNode.Address = *addr6
|
||||
convertedNode.Address.IP = ip6
|
||||
}
|
||||
convertedNode.FailoverNode, _ = uuid.Parse(a.FailoverNode)
|
||||
convertedNode.LastModified = time.Unix(a.LastModified, 0)
|
||||
|
Reference in New Issue
Block a user