mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-11 15:44:52 +08:00
set peer endpoint if host endpoint is nil
This commit is contained in:
parent
87b790aaa6
commit
dc03269771
1 changed files with 2 additions and 2 deletions
|
@ -227,12 +227,12 @@ func GetPeerUpdateForHost(network string, host *models.Host, allNodes []models.N
|
|||
} else if host.EndpointIPv6 != nil && peerHost.EndpointIPv6 != nil {
|
||||
peerEndpoint = peerHost.EndpointIPv6
|
||||
}
|
||||
if host.EndpointIP == nil {
|
||||
if host.EndpointIP == nil && peerEndpoint == nil {
|
||||
if peerHost.EndpointIP != nil {
|
||||
peerEndpoint = peerHost.EndpointIP
|
||||
}
|
||||
}
|
||||
if host.EndpointIP == nil && peerEndpoint == nil {
|
||||
if host.EndpointIPv6 == nil && peerEndpoint == nil {
|
||||
if peerHost.EndpointIPv6 != nil {
|
||||
peerEndpoint = peerHost.EndpointIPv6
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue