Revert "wgengine/netstack: update gvisor to remove 64-bit only limitation"

Breaks our corp repo due to gRPC dependency hell.

This reverts commit d42f8b7f9a.
This commit is contained in:
David Anderson
2021-03-16 15:36:06 -07:00
parent e0f2796b43
commit 84aba349d9
5 changed files with 96 additions and 230 deletions

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// netstack doesn't build on 32-bit machines (https://github.com/google/gvisor/issues/5241)
// +build amd64 arm64 ppc64le riscv64 s390x
// Package netstack wires up gVisor's netstack into Tailscale.
package netstack
@ -190,7 +193,7 @@ func (ns *Impl) updateIPs(nm *netmap.NetworkMap) {
}
}
for ip := range ipsToBeAdded {
var err tcpip.Error
var err *tcpip.Error
if ip.To4() == "" {
err = ns.ipstack.AddAddress(nicID, ipv6.ProtocolNumber, ip)
} else {
@ -285,7 +288,7 @@ func (ns *Impl) injectOutbound() {
full := make([]byte, 0, pkt.Size())
full = append(full, hdrNetwork.View()...)
full = append(full, hdrTransport.View()...)
full = append(full, pkt.Data().AsRange().AsView()...)
full = append(full, pkt.Data.ToView()...)
if debugNetstack {
ns.logf("[v2] packet Write out: % x", full)
}