1
0
mirror of https://passt.top/passt synced 2024-12-22 13:45:32 +00:00

tcp_splice: Fix side in OUT_WAIT flag setting

If the "from" (input) side for a given transfer is 0, and we can't
complete the write right away, what we need to be waiting for is for
output readiness on side 1, not 0, and the other way around as well.

This causes random transfer failures for local TCP connections,
depending if we ever need to wait for output readiness.

Reported-by: Paul Holzinger <pholzing@redhat.com>
Link: https://github.com/containers/podman/issues/23517
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Tested-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Stefano Brivio 2024-08-06 13:43:44 +02:00
parent 031df332e9
commit 3a082c4ecb

View File

@ -577,7 +577,7 @@ eintr:
if (conn->read[fromsidei] == conn->written[fromsidei])
break;
conn_event(c, conn, OUT_WAIT(fromsidei));
conn_event(c, conn, OUT_WAIT(!fromsidei));
break;
}