Skip to content
This repository was archived by the owner on Jul 13, 2025. It is now read-only.

Commit ead33e8

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents fa823ab + e932423 commit ead33e8

File tree

160 files changed

+8708
-1219
lines changed

Some content is hidden

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

160 files changed

+8708
-1219
lines changed

.golangci.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,11 @@ issues:
2626

2727
# Per-linter settings are contained in this top-level key
2828
linters-settings:
29-
# Enable all rules by default; we don't use invisible unicode runes.
30-
bidichk:
31-
3229
gofmt:
3330
rewrite-rules:
3431
- pattern: 'interface{}'
3532
replacement: 'any'
3633

37-
goimports:
38-
3934
govet:
4035
# Matches what we use in corp as of 2023-12-07
4136
enable:
@@ -78,8 +73,6 @@ linters-settings:
7873
# analyzer doesn't support type declarations
7974
#- github.com/tailscale/tailscale/types/logger.Logf
8075

81-
misspell:
82-
8376
revive:
8477
enable-all-rules: false
8578
ignore-generated-header: true

ALPINE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.18
1+
3.19

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ RUN GOARCH=$TARGETARCH go install -ldflags="\
6262
-X tailscale.com/version.gitCommitStamp=$VERSION_GIT_HASH" \
6363
-v ./cmd/tailscale ./cmd/tailscaled ./cmd/containerboot
6464

65-
FROM alpine:3.18
65+
FROM alpine:3.19
6666
RUN apk add --no-cache ca-certificates iptables iproute2 ip6tables
67+
RUN rm /sbin/iptables && ln -s /sbin/iptables-legacy /sbin/iptables
68+
RUN rm /sbin/ip6tables && ln -s /sbin/ip6tables-legacy /sbin/ip6tables
6769

6870
COPY --from=build-env /go/bin/* /usr/local/bin/
6971
# For compat with the previous run.sh, although ideally you should be

Dockerfile.base

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Copyright (c) Tailscale Inc & AUTHORS
22
# SPDX-License-Identifier: BSD-3-Clause
33

4-
FROM alpine:3.18
5-
RUN apk add --no-cache ca-certificates iptables iproute2 ip6tables iputils
4+
FROM alpine:3.19
5+
RUN apk add --no-cache ca-certificates iptables iptables-legacy iproute2 ip6tables iputils
6+
# Alpine 3.19 replaces legacy iptables with nftables based implementation. We
7+
# can't be certain that all hosts that run Tailscale containers currently
8+
# suppport nftables, so link back to legacy for backwards compatibility reasons.
9+
# TODO(irbekrm): add some way how to determine if we still run on nodes that
10+
# don't support nftables, so that we can eventually remove these symlinks.
11+
RUN rm /sbin/iptables && ln -s /sbin/iptables-legacy /sbin/iptables
12+
RUN rm /sbin/ip6tables && ln -s /sbin/ip6tables-legacy /sbin/ip6tables

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.81.0
1+
1.83.0

build_docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ eval "$(./build_dist.sh shellvars)"
1616

1717
DEFAULT_TARGET="client"
1818
DEFAULT_TAGS="v${VERSION_SHORT},v${VERSION_MINOR}"
19-
DEFAULT_BASE="tailscale/alpine-base:3.18"
19+
DEFAULT_BASE="tailscale/alpine-base:3.19"
2020
# Set a few pre-defined OCI annotations. The source annotation is used by tools such as Renovate that scan the linked
2121
# Github repo to find release notes for any new image tags. Note that for official Tailscale images the default
2222
# annotations defined here will be overriden by release scripts that call this script.

client/tailscale/devices.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ type Device struct {
7979
// Tailscale have attempted to collect this from the device but it has not
8080
// opted in, PostureIdentity will have Disabled=true.
8181
PostureIdentity *DevicePostureIdentity `json:"postureIdentity"`
82+
83+
// TailnetLockKey is the tailnet lock public key of the node as a hex string.
84+
TailnetLockKey string `json:"tailnetLockKey,omitempty"`
85+
86+
// TailnetLockErr indicates an issue with the tailnet lock node-key signature
87+
// on this device. This field is only populated when tailnet lock is enabled.
88+
TailnetLockErr string `json:"tailnetLockError,omitempty"`
8289
}
8390

8491
type DevicePostureIdentity struct {

client/web/web.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,8 @@ func (s *Server) requireTailscaleIP(w http.ResponseWriter, r *http.Request) (han
335335
ipv6ServiceHost = "[" + tsaddr.TailscaleServiceIPv6String + "]"
336336
)
337337
// allow requests on quad-100 (or ipv6 equivalent)
338-
if r.Host == ipv4ServiceHost || r.Host == ipv6ServiceHost {
338+
host := strings.TrimSuffix(r.Host, ":80")
339+
if host == ipv4ServiceHost || host == ipv6ServiceHost {
339340
return false
340341
}
341342

client/web/web_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,16 @@ func TestRequireTailscaleIP(t *testing.T) {
11771177
target: "http://[fd7a:115c:a1e0::53]/",
11781178
wantHandled: false,
11791179
},
1180+
{
1181+
name: "quad-100:80",
1182+
target: "http://100.100.100.100:80/",
1183+
wantHandled: false,
1184+
},
1185+
{
1186+
name: "ipv6-service-addr:80",
1187+
target: "http://[fd7a:115c:a1e0::53]:80/",
1188+
wantHandled: false,
1189+
},
11801190
}
11811191

11821192
for _, tt := range tests {

clientupdate/clientupdate.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"strings"
2929

3030
"tailscale.com/hostinfo"
31+
"tailscale.com/types/lazy"
3132
"tailscale.com/types/logger"
3233
"tailscale.com/util/cmpver"
3334
"tailscale.com/version"
@@ -249,9 +250,13 @@ func (up *Updater) getUpdateFunction() (fn updateFunction, canAutoUpdate bool) {
249250
return nil, false
250251
}
251252

253+
var canAutoUpdateCache lazy.SyncValue[bool]
254+
252255
// CanAutoUpdate reports whether auto-updating via the clientupdate package
253256
// is supported for the current os/distro.
254-
func CanAutoUpdate() bool {
257+
func CanAutoUpdate() bool { return canAutoUpdateCache.Get(canAutoUpdateUncached) }
258+
259+
func canAutoUpdateUncached() bool {
255260
if version.IsMacSysExt() {
256261
// Macsys uses Sparkle for auto-updates, which doesn't have an update
257262
// function in this package.

0 commit comments

Comments
 (0)