[roll] Roll fuchsia [netstack][fdio] TCP connection reset handling fixes

Fix fdio and netstack2 layers to propagate reset error state and return
appropriate errors for socket read/write calls, while keeping the
behavior in parity with Linux. Address few edge cases for connecting
vs connected states and blocking vs non-blocking socket calls.

- Define new fdio states to record reset error state for connected
  and connecting sockets. Apply that for subsequent read/write socket
  calls to return appropriate errors. This change ensures that the
  behavior is in parity with Linux.
- Fix netstack2 to account for connection handshake failures while
  signalling an incoming event to the client.
- Define 2 new signals to convey connection reset and refused cases
  to the fdio layer.
- Refactor part of gVisor endpoint error handling from within loopXX
  routines and offload the actions to the EventHUp callback that is
  currently registered with gVisor stack.
- Fix EventHUp callback registration to check for prior endpoint
  error state and if so, intitiate closing of the endpoint.
- Enable TCP shutdown for a listening socket.

Original-Bug: 35594
Test: fx test -od netstack-bsdsocket-c-api-test -- --gtest_filter=NetStreamTest/StopListenWhileConnect.*
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/437660
Original-Revision: c99fe9c1284265fe5eb0cd3ce7c3ba431b2f3f4a
GitOrigin-RevId: 4558fbf61ddc0e142baebcdc205223597e52f6f8
Change-Id: Ifdcbc698d02cfc03530892e6294d3cdba4bcdd12
1 file changed
tree: 6afd9c269a35bf4412042f638e222ec2bb2483e3
  1. garnet/
  2. infra/
  3. peridot/
  4. third_party/
  5. topaz/
  6. zircon/
  7. flower
  8. jiri.lock
  9. minimal
  10. prebuilts
  11. README.md
  12. stem
  13. test_durations
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.