all: fix spelling mistakes
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
e73657d7aa
commit
d4811f11a0
@ -2460,11 +2460,11 @@ func (c *Conn) maybeCloseDERPsOnRebind(okayLocalIPs []netip.Prefix) {
|
||||
for regionID, ad := range c.activeDerp {
|
||||
la, err := ad.c.LocalAddr()
|
||||
if err != nil {
|
||||
c.closeOrReconectDERPLocked(regionID, "rebind-no-localaddr")
|
||||
c.closeOrReconnectDERPLocked(regionID, "rebind-no-localaddr")
|
||||
continue
|
||||
}
|
||||
if !tsaddr.PrefixesContainsIP(okayLocalIPs, la.Addr()) {
|
||||
c.closeOrReconectDERPLocked(regionID, "rebind-default-route-change")
|
||||
c.closeOrReconnectDERPLocked(regionID, "rebind-default-route-change")
|
||||
continue
|
||||
}
|
||||
regionID := regionID
|
||||
@ -2475,7 +2475,7 @@ func (c *Conn) maybeCloseDERPsOnRebind(okayLocalIPs []netip.Prefix) {
|
||||
if err := dc.Ping(ctx); err != nil {
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
c.closeOrReconectDERPLocked(regionID, "rebind-ping-fail")
|
||||
c.closeOrReconnectDERPLocked(regionID, "rebind-ping-fail")
|
||||
return
|
||||
}
|
||||
c.logf("post-rebind ping of DERP region %d okay", regionID)
|
||||
@ -2484,14 +2484,14 @@ func (c *Conn) maybeCloseDERPsOnRebind(okayLocalIPs []netip.Prefix) {
|
||||
c.logActiveDerpLocked()
|
||||
}
|
||||
|
||||
// closeOrReconectDERPLocked closes the DERP connection to the
|
||||
// closeOrReconnectDERPLocked closes the DERP connection to the
|
||||
// provided regionID and starts reconnecting it if it's our current
|
||||
// home DERP.
|
||||
//
|
||||
// why is a reason for logging.
|
||||
//
|
||||
// c.mu must be held.
|
||||
func (c *Conn) closeOrReconectDERPLocked(regionID int, why string) {
|
||||
func (c *Conn) closeOrReconnectDERPLocked(regionID int, why string) {
|
||||
c.closeDerpLocked(regionID, why)
|
||||
if !c.privateKey.IsZero() && c.myDerp == regionID {
|
||||
c.startDerpHomeConnectLocked()
|
||||
@ -2788,7 +2788,7 @@ func (c *Conn) ReSTUN(why string) {
|
||||
// reconfigures the engine with a zero private key.)
|
||||
//
|
||||
// This used to just check c.privateKey.IsZero, but that broke
|
||||
// some end-to-end tests tests that didn't ever set a private
|
||||
// some end-to-end tests that didn't ever set a private
|
||||
// key somehow. So for now, only stop doing work if we ever
|
||||
// had a key, which helps real users, but appeases tests for
|
||||
// now. TODO: rewrite those tests to be less brittle or more
|
||||
@ -4022,7 +4022,7 @@ func (de *endpoint) handleCallMeMaybe(m *disco.CallMeMaybe) {
|
||||
}))
|
||||
}
|
||||
|
||||
// Delete any prior CalllMeMaybe endpoints that weren't included
|
||||
// Delete any prior CallMeMaybe endpoints that weren't included
|
||||
// in this message.
|
||||
for ep, want := range de.isCallMeMaybeEP {
|
||||
if !want {
|
||||
@ -4119,17 +4119,17 @@ type ippEndpointCache struct {
|
||||
type discoInfo struct {
|
||||
// discoKey is the same as the Conn.discoInfo map key,
|
||||
// just so you can pass around a *discoInfo alone.
|
||||
// Not modifed once initiazed.
|
||||
// Not modified once initialized.
|
||||
discoKey key.DiscoPublic
|
||||
|
||||
// discoShort is discoKey.ShortString().
|
||||
// Not modifed once initiazed;
|
||||
// Not modified once initialized;
|
||||
discoShort string
|
||||
|
||||
// sharedKey is the precomputed key for communication with the
|
||||
// peer that has the DiscoKey used to look up this *discoInfo in
|
||||
// Conn.discoInfo.
|
||||
// Not modifed once initialized.
|
||||
// Not modified once initialized.
|
||||
sharedKey key.DiscoShared
|
||||
|
||||
// Mutable fields follow, owned by Conn.mu:
|
||||
|
Reference in New Issue
Block a user