From 8a2f7e716dcc62f04d2808e8ade34941c94fc956 Mon Sep 17 00:00:00 2001 From: Zach Koopmans Date: Mon, 29 Mar 2021 13:28:32 -0700 Subject: [syserror] Split usermem package Split usermem package to help remove syserror dependency in go_marshal. New hostarch package contains code not dependent on syserror. PiperOrigin-RevId: 365651233 --- test/iptables/BUILD | 2 +- test/iptables/nat.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'test/iptables') diff --git a/test/iptables/BUILD b/test/iptables/BUILD index 94d4ca2d4..9805665ac 100644 --- a/test/iptables/BUILD +++ b/test/iptables/BUILD @@ -16,8 +16,8 @@ go_library( visibility = ["//test/iptables:__subpackages__"], deps = [ "//pkg/binary", + "//pkg/hostarch", "//pkg/test/testutil", - "//pkg/usermem", "@org_golang_x_sys//unix:go_default_library", ], ) diff --git a/test/iptables/nat.go b/test/iptables/nat.go index 70d8a1832..0776639a7 100644 --- a/test/iptables/nat.go +++ b/test/iptables/nat.go @@ -22,7 +22,7 @@ import ( "golang.org/x/sys/unix" "gvisor.dev/gvisor/pkg/binary" - "gvisor.dev/gvisor/pkg/usermem" + "gvisor.dev/gvisor/pkg/hostarch" ) const redirectPort = 42 @@ -848,7 +848,7 @@ func recvOrigDstAddr4(sockfd int) (unix.RawSockaddrInet4, error) { return unix.RawSockaddrInet4{}, err } var addr unix.RawSockaddrInet4 - binary.Unmarshal(buf, usermem.ByteOrder, &addr) + binary.Unmarshal(buf, hostarch.ByteOrder, &addr) return addr, nil } @@ -858,7 +858,7 @@ func recvOrigDstAddr6(sockfd int) (unix.RawSockaddrInet6, error) { return unix.RawSockaddrInet6{}, err } var addr unix.RawSockaddrInet6 - binary.Unmarshal(buf, usermem.ByteOrder, &addr) + binary.Unmarshal(buf, hostarch.ByteOrder, &addr) return addr, nil } -- cgit v1.2.3