Skip to content

Commit fc7d74b

Browse files
feat(ci): Bump to upstream 1.92.5 (#30)
https://tailscale.com/changelog#2026-01-06 This takes this repo from 1.90.3 > 1.92.5
2 parents 8d30211 + afae851 commit fc7d74b

389 files changed

Lines changed: 14089 additions & 5807 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/vet.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: tailscale.com/cmd/vet
2+
3+
env:
4+
HOME: ${{ github.workspace }}
5+
# GOMODCACHE is the same definition on all OSes. Within the workspace, we use
6+
# toplevel directories "src" (for the checked out source code), and "gomodcache"
7+
# and other caches as siblings to follow.
8+
GOMODCACHE: ${{ github.workspace }}/gomodcache
9+
10+
on:
11+
push:
12+
branches:
13+
- main
14+
- "release-branch/*"
15+
paths:
16+
- "**.go"
17+
pull_request:
18+
paths:
19+
- "**.go"
20+
21+
jobs:
22+
vet:
23+
runs-on: [ self-hosted, linux ]
24+
timeout-minutes: 5
25+
26+
steps:
27+
- name: Check out code
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
with:
30+
path: src
31+
32+
- name: Build 'go vet' tool
33+
working-directory: src
34+
run: ./tool/go build -o /tmp/vettool tailscale.com/cmd/vet
35+
36+
- name: Run 'go vet'
37+
working-directory: src
38+
run: ./tool/go vet -vettool=/tmp/vettool tailscale.com/...

CODE_OF_CONDUCT.md

Lines changed: 58 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,147 +1,103 @@
1-
# Contributor Covenant Code of Conduct
1+
# Tailscale Community Code of Conduct
22

33
## Our Pledge
44

5-
We are committed to creating an open, welcoming, diverse, inclusive,
6-
healthy and respectful community.
5+
We are committed to creating an open, welcoming, diverse, inclusive, healthy and respectful community.
6+
Unacceptable, harmful and inappropriate behavior will not be tolerated.
77

88
## Our Standards
99

10-
Examples of behavior that contributes to a positive environment for our
11-
community include:
12-
* Demonstrating empathy and kindness toward other people.
13-
* Being respectful of differing opinions, viewpoints, and experiences.
14-
* Giving and gracefully accepting constructive feedback.
15-
* Accepting responsibility and apologizing to those affected by our
16-
mistakes, and learning from the experience.
17-
* Focusing on what is best not just for us as individuals, but for the
18-
overall community.
10+
Examples of behavior that contributes to a positive environment for our community include:
11+
12+
- Demonstrating empathy and kindness toward other people.
13+
- Being respectful of differing opinions, viewpoints, and experiences.
14+
- Giving and gracefully accepting constructive feedback.
15+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience.
16+
- Focusing on what is best not just for us as individuals, but for the overall community.
1917

2018
Examples of unacceptable behavior include without limitation:
21-
* The use of sexualized language or imagery, and sexual attention or
22-
advances of any kind.
23-
* The use of violent, intimidating or bullying language or imagery.
24-
* Trolling, insulting or derogatory comments, and personal or
25-
political attacks.
26-
* Public or private harassment.
27-
* Publishing others' private information, such as a physical or email
28-
address, without their explicit permission.
29-
* Spamming community channels and members, such as sending repeat messages,
30-
low-effort content, or automated messages.
31-
* Phishing or any similar activity;
32-
* Distributing or promoting malware;
33-
* Other conduct which could reasonably be considered inappropriate in a
34-
professional setting.
35-
36-
Please also see the Tailscale Acceptable Use Policy, available at
37-
[tailscale.com/tailscale-aup](https://tailscale.com/tailscale-aup).
38-
39-
# Reporting Incidents
40-
41-
Instances of abusive, harassing, or otherwise unacceptable behavior
42-
may be reported to Tailscale directly via info@tailscale.com, or to
43-
the community leaders or moderators via DM or similar.
19+
20+
- The use of language, imagery or emojis (collectively "content") that is racist, sexist, homophobic, transphobic, or otherwise harassing or discriminatory based on any protected characteristic.
21+
- The use of sexualized content and sexual attention or advances of any kind.
22+
- The use of violent, intimidating or bullying content.
23+
- Trolling, concern trolling, insulting or derogatory comments, and personal or political attacks.
24+
- Public or private harassment.
25+
- Publishing others' personal information, such as a photo, physical address, email address, online profile information, or other personal information, without their explicit permission or with the intent to bully or harass the other person.
26+
- Posting deep fake or other AI generated content about or involving another person without the explicit permission.
27+
- Spamming community channels and members, such as sending repeat messages, low-effort content, or automated messages.
28+
- Phishing or any similar activity.
29+
- Distributing or promoting malware.
30+
- The use of any coded or suggestive content to hide or provoke otherwise unacceptable behavior.
31+
- Other conduct which could reasonably be considered harmful, illegal, or inappropriate in a professional setting.
32+
33+
Please also see the Tailscale Acceptable Use Policy, available at [tailscale.com/tailscale-aup](https://tailscale.com/tailscale-aup).
34+
35+
## Reporting Incidents
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to Tailscale directly via <info@tailscale.com>, or to the community leaders or moderators via DM or similar.
4438
All complaints will be reviewed and investigated promptly and fairly.
4539
We will respect the privacy and safety of the reporter of any issues.
4640

47-
Please note that this community is not moderated by staff 24/7, and we
48-
do not have, and do not undertake, any obligation to prescreen, monitor,
49-
edit, or remove any content or data, or to actively seek facts or
50-
circumstances indicating illegal activity. While we strive to keep the
51-
community safe and welcoming, moderation may not be immediate at all hours.
41+
Please note that this community is not moderated by staff 24/7, and we do not have, and do not undertake, any obligation to prescreen, monitor, edit, or remove any content or data, or to actively seek facts or circumstances indicating illegal activity.
42+
While we strive to keep the community safe and welcoming, moderation may not be immediate at all hours.
5243
If you encounter any issues, report them using the appropriate channels.
5344

54-
## Enforcement
55-
56-
Community leaders and moderators are responsible for clarifying and
57-
enforcing our standards of acceptable behavior and will take appropriate
58-
and fair corrective action in response to any behavior that they deem
59-
inappropriate, threatening, offensive, or harmful.
45+
## Enforcement Guidelines
6046

61-
Community leaders and moderators have the right and responsibility to remove,
62-
edit, or reject comments, commits, code, wiki edits, issues, and other
63-
contributions that are not aligned to this Community Code of Conduct.
64-
Tailscale retains full discretion to take action (or not) in response
65-
to a violation of these guidelines with or without notice or liability
66-
to you. We will interpret our policies and resolve disputes in favor of
67-
protecting users, customers, the public, our community and our company,
68-
as a whole.
47+
Community leaders and moderators are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
6948

70-
## Enforcement Guidelines
49+
Community leaders and moderators have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Community Code of Conduct.
50+
Tailscale retains full discretion to take action (or not) in response to a violation of these guidelines with or without notice or liability to you.
51+
We will interpret our policies and resolve disputes in favor of protecting users, customers, the public, our community and our company, as a whole.
7152

72-
Community leaders will follow these Community Impact Guidelines in
73-
determining the consequences for any action they deem in violation of
74-
this Code of Conduct:
53+
Community leaders will follow these community enforcement guidelines in determining the consequences for any action they deem in violation of this Code of Conduct,
54+
and retain full discretion to apply the enforcement guidelines as necessary depending on the circumstances:
7555

7656
### 1. Correction
7757

78-
Community Impact: Use of inappropriate language or other behavior
79-
deemed unprofessional or unwelcome in the community.
58+
Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
8059

81-
Consequence: A private, written warning from community leaders,
82-
providing clarity around the nature of the violation and an
83-
explanation of why the behavior was inappropriate. A public apology
84-
may be requested.
60+
Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate.
61+
A public apology may be requested.
8562

8663
### 2. Warning
8764

88-
Community Impact: A violation through a single incident or series
89-
of actions.
65+
Community Impact: A violation through a single incident or series of actions.
9066

91-
Consequence: A warning with consequences for continued
92-
behavior. No interaction with the people involved, including
93-
unsolicited interaction with those enforcing this Community Code of Conduct,
94-
for a specified period of time. This includes avoiding interactions in
95-
community spaces as well as external channels like social
96-
media. Violating these terms may lead to a temporary or permanent ban.
67+
Consequence: A warning with consequences for continued behavior.
68+
No interaction with the people involved, including unsolicited interaction with those enforcing this Community Code of Conduct, for a specified period of time.
69+
This includes avoiding interactions in community spaces as well as external channels like social media.
70+
Violating these terms may lead to a temporary or permanent ban.
9771

9872
### 3. Temporary Ban
9973

100-
Community Impact: A serious violation of community standards,
101-
including sustained inappropriate behavior.
74+
Community Impact: A serious violation of community standards, including sustained inappropriate behavior.
10275

103-
Consequence: A temporary ban from any sort of interaction or
104-
public communication with the community for a specified period of
105-
time. No public or private interaction with the people involved,
106-
including unsolicited interaction with those enforcing the Code of Conduct,
107-
is allowed during this period. Violating these terms may lead to a permanent ban.
76+
Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time.
77+
No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
10878

10979
### 4. Permanent Ban
11080

111-
Community Impact: Demonstrating a pattern of violation of community
112-
standards, including sustained inappropriate behavior, harassment of
113-
an individual, or aggression toward or disparagement of
114-
classes of individuals.
81+
Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
11582

116-
Consequence: A permanent ban from any sort of public interaction
117-
within the community.
83+
Consequence: A permanent ban from any sort of public interaction within the community.
11884

11985
## Acceptable Use Policy
12086

121-
Violation of this Community Code of Conduct may also violate the
122-
Tailscale Acceptable Use Policy, which may result in suspension or
123-
termination of your Tailscale account. For more information, please
124-
see the Tailscale Acceptable Use Policy, available at
125-
[tailscale.com/tailscale-aup](https://tailscale.com/tailscale-aup).
87+
Violation of this Community Code of Conduct may also violate the Tailscale Acceptable Use Policy, which may result in suspension or termination of your Tailscale account.
88+
For more information, please see the Tailscale Acceptable Use Policy, available at [tailscale.com/tailscale-aup](https://tailscale.com/tailscale-aup).
12689

12790
## Privacy
12891

129-
Please see the Tailscale [Privacy Policy](http://tailscale.com/privacy-policy)
130-
for more information about how Tailscale collects, uses, discloses and protects
131-
information.
92+
Please see the Tailscale [Privacy Policy](https://tailscale.com/privacy-policy) for more information about how Tailscale collects, uses, discloses and protects information.
13293

13394
## Attribution
13495

135-
This Code of Conduct is adapted from the [Contributor
136-
Covenant][homepage], version 2.0, available at
137-
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
96+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at <https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
13897

139-
Community Impact Guidelines were inspired by [Mozilla's code of
140-
conduct enforcement ladder](https://github.com/mozilla/diversity).
98+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
14199

142100
[homepage]: https://www.contributor-covenant.org
143101

144-
For answers to common questions about this code of conduct, see the
145-
FAQ at https://www.contributor-covenant.org/faq. Translations are
146-
available at https://www.contributor-covenant.org/translations.
147-
102+
For answers to common questions about this code of conduct, see the FAQ at <https://www.contributor-covenant.org/faq>.
103+
Translations are available at <https://www.contributor-covenant.org/translations>.

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.90.8
1+
1.92.5

appc/appconnector.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import (
1616
"net/netip"
1717
"slices"
1818
"strings"
19-
"sync"
2019
"time"
2120

21+
"tailscale.com/syncs"
2222
"tailscale.com/types/appctype"
2323
"tailscale.com/types/logger"
2424
"tailscale.com/types/views"
@@ -139,7 +139,7 @@ type AppConnector struct {
139139
hasStoredRoutes bool
140140

141141
// mu guards the fields that follow
142-
mu sync.Mutex
142+
mu syncs.Mutex
143143

144144
// domains is a map of lower case domain names with no trailing dot, to an
145145
// ordered list of resolved IP addresses.
@@ -203,12 +203,12 @@ func NewAppConnector(c Config) *AppConnector {
203203
ac.wildcards = c.RouteInfo.Wildcards
204204
ac.controlRoutes = c.RouteInfo.Control
205205
}
206-
ac.writeRateMinute = newRateLogger(time.Now, time.Minute, func(c int64, s time.Time, l int64) {
207-
ac.logf("routeInfo write rate: %d in minute starting at %v (%d routes)", c, s, l)
208-
metricStoreRoutes(c, l)
206+
ac.writeRateMinute = newRateLogger(time.Now, time.Minute, func(c int64, s time.Time, ln int64) {
207+
ac.logf("routeInfo write rate: %d in minute starting at %v (%d routes)", c, s, ln)
208+
metricStoreRoutes(c, ln)
209209
})
210-
ac.writeRateDay = newRateLogger(time.Now, 24*time.Hour, func(c int64, s time.Time, l int64) {
211-
ac.logf("routeInfo write rate: %d in 24 hours starting at %v (%d routes)", c, s, l)
210+
ac.writeRateDay = newRateLogger(time.Now, 24*time.Hour, func(c int64, s time.Time, ln int64) {
211+
ac.logf("routeInfo write rate: %d in 24 hours starting at %v (%d routes)", c, s, ln)
212212
})
213213
return ac
214214
}
@@ -510,8 +510,8 @@ func (e *AppConnector) addDomainAddrLocked(domain string, addr netip.Addr) {
510510
slices.SortFunc(e.domains[domain], compareAddr)
511511
}
512512

513-
func compareAddr(l, r netip.Addr) int {
514-
return l.Compare(r)
513+
func compareAddr(a, b netip.Addr) int {
514+
return a.Compare(b)
515515
}
516516

517517
// routesWithout returns a without b where a and b

appc/ippool.go

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Copyright (c) Tailscale Inc & AUTHORS
2+
// SPDX-License-Identifier: BSD-3-Clause
3+
4+
package appc
5+
6+
import (
7+
"errors"
8+
"net/netip"
9+
10+
"go4.org/netipx"
11+
)
12+
13+
// errPoolExhausted is returned when there are no more addresses to iterate over.
14+
var errPoolExhausted = errors.New("ip pool exhausted")
15+
16+
// ippool allows for iteration over all the addresses within a netipx.IPSet.
17+
// netipx.IPSet has a Ranges call that returns the "minimum and sorted set of IP ranges that covers [the set]".
18+
// netipx.IPRange is "an inclusive range of IP addresses from the same address family.". So we can iterate over
19+
// all the addresses in the set by keeping a track of the last address we returned, calling Next on the last address
20+
// to get the new one, and if we run off the edge of the current range, starting on the next one.
21+
type ippool struct {
22+
// ranges defines the addresses in the pool
23+
ranges []netipx.IPRange
24+
// last is internal tracking of which the last address provided was.
25+
last netip.Addr
26+
// rangeIdx is internal tracking of which netipx.IPRange from the IPSet we are currently on.
27+
rangeIdx int
28+
}
29+
30+
func newIPPool(ipset *netipx.IPSet) *ippool {
31+
if ipset == nil {
32+
return &ippool{}
33+
}
34+
return &ippool{ranges: ipset.Ranges()}
35+
}
36+
37+
// next returns the next address from the set, or errPoolExhausted if we have
38+
// iterated over the whole set.
39+
func (ipp *ippool) next() (netip.Addr, error) {
40+
if ipp.rangeIdx >= len(ipp.ranges) {
41+
// ipset is empty or we have iterated off the end
42+
return netip.Addr{}, errPoolExhausted
43+
}
44+
if !ipp.last.IsValid() {
45+
// not initialized yet
46+
ipp.last = ipp.ranges[0].From()
47+
return ipp.last, nil
48+
}
49+
currRange := ipp.ranges[ipp.rangeIdx]
50+
if ipp.last == currRange.To() {
51+
// then we need to move to the next range
52+
ipp.rangeIdx++
53+
if ipp.rangeIdx >= len(ipp.ranges) {
54+
return netip.Addr{}, errPoolExhausted
55+
}
56+
ipp.last = ipp.ranges[ipp.rangeIdx].From()
57+
return ipp.last, nil
58+
}
59+
ipp.last = ipp.last.Next()
60+
return ipp.last, nil
61+
}

0 commit comments

Comments
 (0)