summaryrefslogtreecommitdiffhomepage
path: root/test/packetimpact/dut
diff options
context:
space:
mode:
authorZeling Feng <zeling@google.com>2021-03-15 10:45:56 -0700
committergVisor bot <gvisor-bot@google.com>2021-03-15 10:47:58 -0700
commit06b047a5a8acbfc910e7e824272919d8ccd8976b (patch)
tree134de9aa1bc51f838576d8ced34060960531c14f /test/packetimpact/dut
parentb9c2174b086ebeb102e87d44b7f4cc9daa7f0175 (diff)
Packetimpact test for ACK to OTW Seq segments behavior in CLOSING
TCP, in CLOSING state, MUST send an ACK with next expected SEQ number after receiving any segment with OTW SEQ number and remain in the same state. While I am here, I also changed shutdown to behave the same as other calls in posix_server. PiperOrigin-RevId: 362976955
Diffstat (limited to 'test/packetimpact/dut')
-rw-r--r--test/packetimpact/dut/posix_server.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/packetimpact/dut/posix_server.cc b/test/packetimpact/dut/posix_server.cc
index 0d93b806e..ea83bbe72 100644
--- a/test/packetimpact/dut/posix_server.cc
+++ b/test/packetimpact/dut/posix_server.cc
@@ -395,7 +395,8 @@ class PosixImpl final : public posix_server::Posix::Service {
::grpc::Status Shutdown(grpc::ServerContext *context,
const ::posix_server::ShutdownRequest *request,
::posix_server::ShutdownResponse *response) override {
- if (shutdown(request->fd(), request->how()) < 0) {
+ response->set_ret(shutdown(request->fd(), request->how()));
+ if (response->ret() < 0) {
response->set_errno_(errno);
}
return ::grpc::Status::OK;