@@ -1663,8 +1663,6 @@ func (c *Conn) derpWriteChanOfAddr(addr netip.AddrPort, peer key.NodePublic) cha
1663
1663
// the provided DERP regionID, and that the peer advertises a DERP
1664
1664
// home region ID of homeID.
1665
1665
//
1666
- // If there's any change, it logs.
1667
- //
1668
1666
// c.mu must be held.
1669
1667
func (c * Conn ) setPeerLastDerpLocked (peer key.NodePublic , regionID , homeID int ) {
1670
1668
if peer .IsZero () {
@@ -1675,23 +1673,6 @@ func (c *Conn) setPeerLastDerpLocked(peer key.NodePublic, regionID, homeID int)
1675
1673
return
1676
1674
}
1677
1675
c .peerLastDerp [peer ] = regionID
1678
-
1679
- var newDesc string
1680
- switch {
1681
- case regionID == homeID && regionID == c .myDerp :
1682
- newDesc = "shared home"
1683
- case regionID == homeID :
1684
- newDesc = "their home"
1685
- case regionID == c .myDerp :
1686
- newDesc = "our home"
1687
- case regionID != homeID :
1688
- newDesc = "alt"
1689
- }
1690
- if old == 0 {
1691
- c .logf ("[v1] magicsock: derp route for %s set to derp-%d (%s)" , peer .ShortString (), regionID , newDesc )
1692
- } else {
1693
- c .logf ("[v1] magicsock: derp route for %s changed from derp-%d => derp-%d (%s)" , peer .ShortString (), old , regionID , newDesc )
1694
- }
1695
1676
}
1696
1677
1697
1678
// derpReadResult is the type sent by runDerpClient to ReceiveIPv4
@@ -4298,6 +4279,8 @@ func (de *endpoint) deleteEndpointLocked(why string, ep netip.AddrPort) {
4298
4279
})
4299
4280
delete (de .endpointState , ep )
4300
4281
if de .bestAddr .AddrPort == ep {
4282
+ de .c .logf ("magicsock: disco: node %v %v now using DERP only (endpoint %s deleted)" ,
4283
+ de .publicKey .ShortString (), de .discoShort (), ep )
4301
4284
de .debugUpdates .Add (EndpointChange {
4302
4285
When : time .Now (),
4303
4286
What : "deleteEndpointLocked-bestAddr-" + why ,
@@ -4703,6 +4686,8 @@ func (de *endpoint) updateFromNode(n *tailcfg.Node, heartbeatDisabled bool) {
4703
4686
de .c .logf ("magicsock: invalid endpoint: %s %s" , ep , err )
4704
4687
continue
4705
4688
}
4689
+ de .c .logf ("magicsock: disco: node %v %v now using %s (WireGuard Only)" ,
4690
+ de .publicKey .ShortString (), de .discoShort (), ipp )
4706
4691
de .bestAddr = addrLatency {
4707
4692
AddrPort : ipp ,
4708
4693
}
@@ -5109,6 +5094,7 @@ func (de *endpoint) stopAndReset() {
5109
5094
func (de * endpoint ) resetLocked () {
5110
5095
de .lastSend = 0
5111
5096
de .lastFullPing = 0
5097
+ de .c .logf ("magicsock: disco: node %v %v now using DERP only (reset)" , de .publicKey .ShortString (), de .discoShort ())
5112
5098
de .bestAddr = addrLatency {}
5113
5099
de .bestAddrAt = 0
5114
5100
de .trustBestAddrUntil = 0
0 commit comments