cloud-hypervisor/virtio-devices
Davíð Steinn Geirsson c5682801d6 virtio-devices: vsock: support half-closed host unix sockets
When the host-side unix socket peer does shutdown(SHUT_WR), read()
returns 0 on the stream. Previously this was treated as a full
connection closure, sending VSOCK_OP_SHUTDOWN with both SHUTDOWN_RCV
and SHUTDOWN_SEND flags and arming the kill timer. This prevented the
guest from sending any further data back through the still-writable
socket.

Change LocalClosed to carry a bool indicating whether receiving from
the guest is also shut down. On stream EOF, only set SHUTDOWN_SEND
(host won't send anymore) and transition to LocalClosed(false),
keeping the connection alive for guest-to-host data flow. The
connection fully closes when the guest also sends SHUTDOWN with
SHUTDOWN_SEND, or sends RST.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 23:34:11 +00:00
..
src virtio-devices: vsock: support half-closed host unix sockets 2026-03-23 23:34:11 +00:00
build.rs build: Add "fuzzing" as a valid cfg(..) attribute 2024-05-08 08:10:28 +00:00
Cargo.toml misc: improve developer experience of cargo clippy 2025-11-17 16:59:49 +00:00