diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2023-11-08 14:17:54 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-11-10 16:51:33 +0100 |
commit | 5ec3634b07215337c2e69d88f9b1d74711897d7d (patch) | |
tree | c4c1868e0d35ee381922469cd1490f099ed6f9fe /tcp.c | |
parent | f0776eac07cfae76a51b5f55d5f95c8a5c62640f (diff) | |
download | passt-5ec3634b07215337c2e69d88f9b1d74711897d7d.tar passt-5ec3634b07215337c2e69d88f9b1d74711897d7d.tar.gz passt-5ec3634b07215337c2e69d88f9b1d74711897d7d.tar.bz2 passt-5ec3634b07215337c2e69d88f9b1d74711897d7d.tar.lz passt-5ec3634b07215337c2e69d88f9b1d74711897d7d.tar.xz passt-5ec3634b07215337c2e69d88f9b1d74711897d7d.tar.zst passt-5ec3634b07215337c2e69d88f9b1d74711897d7d.zip |
tap, pasta: Handle short writes to /dev/tap2023_11_10.5ec3634
tap_send_frames_pasta() sends frames to the namespace by sending them to
our the /dev/tap device. If that write() returns an error, we already
handle it. However we don't handle the case where the write() returns
short, meaning we haven't successfully transmitted the whole frame.
I don't know if this can ever happen with the kernel tap device, but we
should at least report the case so we don't get a cryptic failure. For
the purposes of the return value for tap_send_frames_pasta() we treat this
case as though it was an error (on the grounds that a partial frame is no
use to the namespace).
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tcp.c')
0 files changed, 0 insertions, 0 deletions