summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-07 14:28:23 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-07 14:29:29 -0700
commit47db097773f9c0badb9f7b5866e697a7e7d0da13 (patch)
treed29a0530806d801388d78a56ce9c2ede3360ea03 /test
parent6db55a5bd8933b217d285018ed2187812ebae6ef (diff)
Internal change.
PiperOrigin-RevId: 305341059
Diffstat (limited to 'test')
-rw-r--r--test/packetimpact/testbench/rawsockets.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/packetimpact/testbench/rawsockets.go b/test/packetimpact/testbench/rawsockets.go
index 0c7d0f979..0074484f7 100644
--- a/test/packetimpact/testbench/rawsockets.go
+++ b/test/packetimpact/testbench/rawsockets.go
@@ -47,6 +47,12 @@ func NewSniffer(t *testing.T) (Sniffer, error) {
if err != nil {
return Sniffer{}, err
}
+ if err := unix.SetsockoptInt(snifferFd, unix.SOL_SOCKET, unix.SO_RCVBUFFORCE, 1); err != nil {
+ t.Fatalf("can't set sockopt SO_RCVBUFFORCE to 1: %s", err)
+ }
+ if err := unix.SetsockoptInt(snifferFd, unix.SOL_SOCKET, unix.SO_RCVBUF, 1e7); err != nil {
+ t.Fatalf("can't setsockopt SO_RCVBUF to 10M: %s", err)
+ }
return Sniffer{
t: t,
fd: snifferFd,