summaryrefslogtreecommitdiffhomepage
path: root/tun/tcp_offload_linux_test.go
diff options
context:
space:
mode:
authorJames Tucker <james@tailscale.com>2023-09-27 16:15:09 -0700
committerJason A. Donenfeld <Jason@zx2c4.com>2023-10-10 15:37:17 +0200
commit42ec952eadc297efadc70b9911d5a59bcd2db4a6 (patch)
treeecae374ed851dc2fd141c81319f7622280dde8f2 /tun/tcp_offload_linux_test.go
parentec8f6f82c20c617a3ea94478f2b5e4d49c6d3c2c (diff)
go.mod,tun/netstack: bump gvisor
Signed-off-by: James Tucker <james@tailscale.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tun/tcp_offload_linux_test.go')
-rw-r--r--tun/tcp_offload_linux_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/tun/tcp_offload_linux_test.go b/tun/tcp_offload_linux_test.go
index 9160e18..ddddc48 100644
--- a/tun/tcp_offload_linux_test.go
+++ b/tun/tcp_offload_linux_test.go
@@ -35,8 +35,8 @@ func tcp4PacketMutateIPFields(srcIPPort, dstIPPort netip.AddrPort, flags header.
srcAs4 := srcIPPort.Addr().As4()
dstAs4 := dstIPPort.Addr().As4()
ipFields := &header.IPv4Fields{
- SrcAddr: tcpip.Address(srcAs4[:]),
- DstAddr: tcpip.Address(dstAs4[:]),
+ SrcAddr: tcpip.AddrFromSlice(srcAs4[:]),
+ DstAddr: tcpip.AddrFromSlice(dstAs4[:]),
Protocol: unix.IPPROTO_TCP,
TTL: 64,
TotalLength: uint16(totalLen),
@@ -72,8 +72,8 @@ func tcp6PacketMutateIPFields(srcIPPort, dstIPPort netip.AddrPort, flags header.
srcAs16 := srcIPPort.Addr().As16()
dstAs16 := dstIPPort.Addr().As16()
ipFields := &header.IPv6Fields{
- SrcAddr: tcpip.Address(srcAs16[:]),
- DstAddr: tcpip.Address(dstAs16[:]),
+ SrcAddr: tcpip.AddrFromSlice(srcAs16[:]),
+ DstAddr: tcpip.AddrFromSlice(dstAs16[:]),
TransportProtocol: unix.IPPROTO_TCP,
HopLimit: 64,
PayloadLength: uint16(segmentSize + 20),