Преглед на файлове

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.
Wade Simmons преди 4 години
родител
ревизия
5506da3de9
променени са 1 файла, в които са добавени 1 реда и са изтрити 3 реда
  1. 1 3
      handshake_ix.go

+ 1 - 3
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)