Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebasing patches for go1.21 #66

Merged
merged 7 commits into from
Jun 22, 2023
Merged

rebasing patches for go1.21 #66

merged 7 commits into from
Jun 22, 2023

Conversation

phirework
Copy link

Steps:

  1. git checkout tailscale.go1.20 -- .github, git commit patch: .github/workflows #47
  2. git cherry-pick 8c9eff4, resolve conflict patch: net: add TS_PANIC_ON_TEST_LISTEN_UNSPEC env to panic on unspecified addr listens #48
  3. git cherry-pick 6a17f14, resolve conflict (ignored 26292c0 because changes were already included in step 1) patch: cmd/dist: stamp git commit into runtime.Version value #49
  4. git cherry-pick a2f29de, resolve conflict patch: let cmd/go be built statically and still make cgo binaries from that static binary #52
  5. git cherry-pick 13373ca patch: net, net/http: add enforcement hooks #55
  6. git cherry-pick fb11c0d and git cherry-pick db4dc90 patch: net: add socket read/write hooks #58

@bradfitz
Copy link
Member

Can you fix the commit messages to not say [tailscale1.20] in them? Just [tailscale] is fine if we want to stop updating the number, as it appears the latest style (in the net patches) is.

@bradfitz
Copy link
Member

git rebase -i is my preferred tool for the job there, but you might have a different favorite workflow.

@bradfitz
Copy link
Member

Otherwise looks good, thanks!

phirework and others added 7 commits June 22, 2023 12:13
…nspecified addr listens

For debugging Mac firewall dialog boxes blocking+failing tests.

Change-Id: Ic1a0cd51de7fe553de1c1c9333fa1cc75b8490f2
(cherry picked from commit 8c9eff4)
Git checkouts are not reproducible (in particular, the .git directory's hashes
vary according to the moods of git re: packing and other local settings), so
building our Go toolchain via Nix leads to source hashes that change from machine
to machine and over time.

Since Nix already knows the exact git revision it's building from, this change
lets Nix provide that hash to cmd/dist directly, skipping the rooting around in
.git to find the right hash.

Signed-off-by: Jenny Zhang <[email protected]>
(cherry picked from commit 6a17f14)
Lets us build a statically linked toolchain that has the same
cgo behavior as the standard dynamic toolchain.

Signed-off-by: Jenny Zhang <[email protected]>
(Cherry-picked from a2f29de)
Updates #55
Updates tailscale/corp#8944

Signed-off-by: Jenny Zhang <[email protected]>
(Cherry-picked from 13373ca)
Loosely inspired by nettrace/httptrace, allows functions to be called
when sockets are read from or written to. The hooks are specified via
the context (with a WithSockTrace function).

Only implemented for network sockets on POSIX systems.

Updates tailscale/corp#9230
Updates #58

Signed-off-by: Jenny Zhang <[email protected]>
(Cherry-picked from fb11c0d)
Extends the hooks added by #45 to also expose when TCP sockets are
created or closed (meant to allow TCP stats to be read from them). We
don't do this for all socket types since stats are not available for
UDP sockets, and they tend to be short-lived, thus invoking the hooks
would be useless overhead.

Also fixes read/write hooks to not count out-of-band data, since that's
usually not sent over the wire.

Updates tailscale/corp#9230
Updates #58

Signed-off-by: Jenny Zhang <[email protected]>
(Cherry-picked from db4dc90)
@phirework
Copy link
Author

@bradfitz done

@phirework phirework merged commit 492f6d9 into tailscale.go1.21 Jun 22, 2023
@phirework phirework deleted the phirework/1.21 branch June 22, 2023 21:46
@phirework phirework restored the phirework/1.21 branch July 13, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants