summaryrefslogtreecommitdiffhomepage
path: root/test/packetimpact/runner/defs.bzl
diff options
context:
space:
mode:
authorMithun Iyer <iyerm@google.com>2021-05-05 08:54:23 -0700
committergVisor bot <gvisor-bot@google.com>2021-05-05 08:57:03 -0700
commit61615f3f152499609b76ec14107c35078611960e (patch)
treeb638e8023399a04b89cb7e133d00afeba291d053 /test/packetimpact/runner/defs.bzl
parentd924515b0991a3a14e0b0d7d21268eaed6fafb5b (diff)
Fix a race in reading last seen ICMP error during handshake
On receiving an ICMP error during handshake, the error is propagated by reading `endpoint.lastError`. This can race with the socket layer invoking getsockopt() with SO_ERROR where the same value is read and cleared, causing the handshake to bail out with a non-error state. Fix the race by checking for lastError state and failing the handshake with ErrConnectionAborted if the lastError was read and cleared by say SO_ERROR. The race mentioned in the bug, is caught only with the newly added tcp_test unit test, where we have control over stopping/resuming protocol loop. Adding a packetimpact test as well for sanity testing of ICMP error handling during handshake. Fixes #5922 PiperOrigin-RevId: 372135662
Diffstat (limited to 'test/packetimpact/runner/defs.bzl')
-rw-r--r--test/packetimpact/runner/defs.bzl3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/packetimpact/runner/defs.bzl b/test/packetimpact/runner/defs.bzl
index 634c15727..afe73a69a 100644
--- a/test/packetimpact/runner/defs.bzl
+++ b/test/packetimpact/runner/defs.bzl
@@ -252,6 +252,9 @@ ALL_TESTS = [
name = "tcp_syncookie",
),
PacketimpactTestInfo(
+ name = "tcp_connect_icmp_error",
+ ),
+ PacketimpactTestInfo(
name = "icmpv6_param_problem",
),
PacketimpactTestInfo(