From 5506da3de94c7037f7f43a9430859b54cc484ca2 Mon Sep 17 00:00:00 2001 From: Wade Simmons Date: Fri, 12 Mar 2021 21:43:24 -0500 Subject: [PATCH] Fix selection of UDP remote to use during stage2 (#404) The change for #401 incorrectly called HostInfo.ForcePromoteBest in stage2, when we really we want to pick the remote that we received the response from. --- handshake_ix.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/handshake_ix.go b/handshake_ix.go index 813c68d..f7cf031 100644 --- a/handshake_ix.go +++ b/handshake_ix.go @@ -350,9 +350,7 @@ func ixHandshakeStage2(f *Interface, addr *udpAddr, hostinfo *HostInfo, packet [ ci.eKey = NewNebulaCipherState(eKey) //l.Debugln("got symmetric pairs") - //hostinfo.ClearRemotes() - hostinfo.AddRemote(*addr) - hostinfo.ForcePromoteBest(f.hostMap.preferredRanges) + hostinfo.SetRemote(*addr) hostinfo.CreateRemoteCIDR(remoteCert) f.handshakeManager.Complete(hostinfo, f)