diff options
author | Zach Koopmans <zkoopmans@google.com> | 2021-03-29 13:28:32 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-29 13:30:21 -0700 |
commit | 8a2f7e716dcc62f04d2808e8ade34941c94fc956 (patch) | |
tree | b2195d5728dcbc4f4e59c23ad95d7486ef744371 /test/iptables | |
parent | b125afba416ebeba906ea595a44a55afe4729d64 (diff) |
[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
Diffstat (limited to 'test/iptables')
-rw-r--r-- | test/iptables/BUILD | 2 | ||||
-rw-r--r-- | test/iptables/nat.go | 6 |
2 files changed, 4 insertions, 4 deletions
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 } |