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
@@ -305,7 +305,7 @@ func (f *Filter) CheckTCP(srcIP, dstIP netip.Addr, dstPort uint16) Response {
|
||||
pkt.Decode(dummyPacket) // initialize private fields
|
||||
switch {
|
||||
case (srcIP.Is4() && dstIP.Is6()) || (srcIP.Is6() && srcIP.Is4()):
|
||||
// Mistmatched address families, no filters will
|
||||
// Mismatched address families, no filters will
|
||||
// match.
|
||||
return Drop
|
||||
case srcIP.Is4():
|
||||
@@ -523,7 +523,7 @@ func (f *Filter) runOut(q *packet.Parsed) (r Response, why string) {
|
||||
return Accept, "ok out"
|
||||
}
|
||||
|
||||
// direction is whether a packet was flowing in to this machine, or
|
||||
// direction is whether a packet was flowing into this machine, or
|
||||
// flowing out.
|
||||
type direction int
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ func TestUDPState(t *testing.T) {
|
||||
a4 := parsed(ipproto.UDP, "119.119.119.119", "102.102.102.102", 4242, 4343)
|
||||
b4 := parsed(ipproto.UDP, "102.102.102.102", "119.119.119.119", 4343, 4242)
|
||||
|
||||
// Unsollicited UDP traffic gets dropped
|
||||
// Unsolicited UDP traffic gets dropped
|
||||
if got := acl.RunIn(&a4, flags); got != Drop {
|
||||
t.Fatalf("incoming initial packet not dropped, got=%v: %v", got, a4)
|
||||
}
|
||||
@@ -182,7 +182,7 @@ func TestUDPState(t *testing.T) {
|
||||
a6 := parsed(ipproto.UDP, "2001::2", "2001::1", 4242, 4343)
|
||||
b6 := parsed(ipproto.UDP, "2001::1", "2001::2", 4343, 4242)
|
||||
|
||||
// Unsollicited UDP traffic gets dropped
|
||||
// Unsolicited UDP traffic gets dropped
|
||||
if got := acl.RunIn(&a6, flags); got != Drop {
|
||||
t.Fatalf("incoming initial packet not dropped: %v", a4)
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -570,7 +570,7 @@ func unicastIPNets(ifc *winipcfg.IPAdapterAddresses) []netip.Prefix {
|
||||
//
|
||||
// Any IPv6 link-local addresses are not deleted out of caution as some
|
||||
// configurations may repeatedly re-add them. Link-local addresses are adjusted
|
||||
// to set SkipAsSource. SkipAsSource prevents the addresses from being addded to
|
||||
// to set SkipAsSource. SkipAsSource prevents the addresses from being added to
|
||||
// DNS locally or remotely and from being picked as a source address for
|
||||
// outgoing packets with unspecified sources. See #4647 and
|
||||
// https://web.archive.org/web/20200912120956/https://devblogs.microsoft.com/scripting/use-powershell-to-change-ip-behavior-with-skipassource/
|
||||
|
||||
@@ -214,7 +214,7 @@ func newUserspaceRouterAdvanced(logf logger.Logf, tunname string, linkMon *monit
|
||||
//
|
||||
// As such, if we are running on openWRT, detect a mwan3 config, AND detect a rule
|
||||
// with a preference 2001 (corresponding to the first interface wman3 manages), we
|
||||
// shift the priority of our policies to 13xx. This effectively puts us betwen mwan3's
|
||||
// shift the priority of our policies to 13xx. This effectively puts us between mwan3's
|
||||
// permit-by-src-ip rules and mwan3 lookup of its own routing table which would drop
|
||||
// the packet.
|
||||
isMWAN3, err := checkOpenWRTUsingMWAN3()
|
||||
|
||||
@@ -148,7 +148,7 @@ func (r *userspaceBSDRouter) Set(cfg *Config) (reterr error) {
|
||||
}
|
||||
newRoutes[route] = struct{}{}
|
||||
}
|
||||
// Delete any pre-existing routes.
|
||||
// Delete any preexisting routes.
|
||||
for route := range r.routes {
|
||||
if _, keep := newRoutes[route]; !keep {
|
||||
net := netipx.PrefixIPNet(route)
|
||||
|
||||
@@ -120,7 +120,7 @@ func cleanup(logf logger.Logf, interfaceName string) {
|
||||
// but it can be REALLY SLOW to change the Windows firewall for reasons not understood.
|
||||
// Like 4 minutes slow. But usually it's tens of milliseconds.
|
||||
// See https://github.com/tailscale/tailscale/issues/785.
|
||||
// So this tracks the desired state and runs the actual adjusting code asynchrounsly.
|
||||
// So this tracks the desired state and runs the actual adjusting code asynchronously.
|
||||
type firewallTweaker struct {
|
||||
logf logger.Logf
|
||||
tunGUID windows.GUID
|
||||
|
||||
@@ -549,7 +549,7 @@ var debugTrimWireguard = envknob.RegisterOptBool("TS_DEBUG_TRIM_WIREGUARD")
|
||||
// stable!) but I'm worried that a future regression would be easier to debug
|
||||
// with these knobs in place.
|
||||
func forceFullWireguardConfig(numPeers int) bool {
|
||||
// Did the user explicitly enable trimmming via the environment variable knob?
|
||||
// Did the user explicitly enable trimming via the environment variable knob?
|
||||
if b, ok := debugTrimWireguard().Get(); ok {
|
||||
return !b
|
||||
}
|
||||
@@ -562,7 +562,7 @@ func forceFullWireguardConfig(numPeers int) bool {
|
||||
// isTrimmablePeer reports whether p is a peer that we can trim out of the
|
||||
// network map.
|
||||
//
|
||||
// For implementation simplificy, we can only trim peers that have
|
||||
// For implementation simplicity, we can only trim peers that have
|
||||
// only non-subnet AllowedIPs (an IPv4 /32 or IPv6 /128), which is the
|
||||
// common case for most peers. Subnet router nodes will just always be
|
||||
// created in the wireguard-go config.
|
||||
@@ -664,8 +664,8 @@ func (e *userspaceEngine) maybeReconfigWireguardLocked(discoChanged map[key.Node
|
||||
activeCutoff := e.timeNow().Add(-lazyPeerIdleThreshold)
|
||||
|
||||
// Not all peers can be trimmed from the network map (see
|
||||
// isTrimmablePeer). For those are are trimmable, keep track of
|
||||
// their NodeKey and Tailscale IPs. These are the ones we'll need
|
||||
// isTrimmablePeer). For those that are trimmable, keep track of
|
||||
// their NodeKey and Tailscale IPs. These are the ones we'll need
|
||||
// to install tracking hooks for to watch their send/receive
|
||||
// activity.
|
||||
trackNodes := make([]key.NodePublic, 0, len(full.Peers))
|
||||
|
||||
Reference in New Issue
Block a user