Merge pull request #1982 from gravitl/bugfix_dual_stack_addr

fix node ipv6 address update
This commit is contained in:
dcarns 2023-01-27 08:43:07 -05:00 committed by GitHub
commit 41a1e6e648
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,8 +99,8 @@ func (a *ApiNode) ConvertToServerNode(currentNode *Node) *Node {
}
ip6, addr6, err := net.ParseCIDR(a.Address6)
if err == nil {
convertedNode.Address = *addr6
convertedNode.Address.IP = ip6
convertedNode.Address6 = *addr6
convertedNode.Address6.IP = ip6
}
convertedNode.FailoverNode, _ = uuid.Parse(a.FailoverNode)
convertedNode.LastModified = time.Unix(a.LastModified, 0)