summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorArthur Sfez <asfez@google.com>2021-10-04 13:55:19 -0700
committergVisor bot <gvisor-bot@google.com>2021-10-04 13:57:27 -0700
commit6c1237da03bf52d51284e15e6c6c2b6776cd7da6 (patch)
tree29b7fc06a379494459e2c5d3c3da2e944f34b888 /test
parent429821b0a91091db71509276855e5919d4d90a49 (diff)
Reply to invalid ACKs even when accept queue is full
Before checking if there is space in the accept queue, the listener should verify that the cookie is valid. If it is not, instead of silently dropping the packet, reply with an RST. Fixes #6683 PiperOrigin-RevId: 400807346
Diffstat (limited to 'test')
-rw-r--r--test/packetimpact/tests/tcp_listen_backlog_test.go15
1 files changed, 4 insertions, 11 deletions
diff --git a/test/packetimpact/tests/tcp_listen_backlog_test.go b/test/packetimpact/tests/tcp_listen_backlog_test.go
index 4b0f2e31f..e124002f6 100644
--- a/test/packetimpact/tests/tcp_listen_backlog_test.go
+++ b/test/packetimpact/tests/tcp_listen_backlog_test.go
@@ -150,17 +150,10 @@ func TestTCPListenBacklog(t *testing.T) {
conn := dut.Net.NewTCPIPv4(t, testbench.TCP{DstPort: &remotePort}, testbench.TCP{})
defer conn.Close(t)
conn.Send(t, testbench.TCP{Flags: testbench.TCPFlags(header.TCPFlagAck)})
- if !dut.Uname.IsLinux() {
- // TODO(https://gvisor.dev/issues/6683): Expect a RST.
- if got, err := conn.Expect(t, testbench.TCP{}, time.Second); err == nil {
- t.Errorf("expected no TCP frame, got %s", got)
- }
- } else {
- if got, err := conn.Expect(t, testbench.TCP{}, time.Second); err != nil {
- t.Errorf("expected TCP frame: %s", err)
- } else if got, want := *got.Flags, header.TCPFlagRst; got != want {
- t.Errorf("got %s, want %s", got, want)
- }
+ if got, err := conn.Expect(t, testbench.TCP{}, time.Second); err != nil {
+ t.Errorf("expected TCP frame: %s", err)
+ } else if got, want := *got.Flags, header.TCPFlagRst; got != want {
+ t.Errorf("got %s, want %s", got, want)
}
}()