aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorHayato Kiwata <dev@haytok.jp>2026-07-17 02:21:21 +0900
committerStefano Brivio <sbrivio@redhat.com>2026-07-17 12:39:12 +0200
commit5418bd9a06c71f5c8e47a71aa460baf6d2a4f32e (patch)
tree1db33684059b83fe36a0041cac71f35dff58070a
parent090d739bd16ed0d810bf2fe9603229aad74adc62 (diff)
downloadpasst-5418bd9a06c71f5c8e47a71aa460baf6d2a4f32e.tar
passt-5418bd9a06c71f5c8e47a71aa460baf6d2a4f32e.tar.gz
passt-5418bd9a06c71f5c8e47a71aa460baf6d2a4f32e.tar.bz2
passt-5418bd9a06c71f5c8e47a71aa460baf6d2a4f32e.tar.lz
passt-5418bd9a06c71f5c8e47a71aa460baf6d2a4f32e.tar.xz
passt-5418bd9a06c71f5c8e47a71aa460baf6d2a4f32e.tar.zst
passt-5418bd9a06c71f5c8e47a71aa460baf6d2a4f32e.zip
tap: Fix EAGAIN/EWOULDBLOCK check in tap_pasta_input()
On Linux, EAGAIN and EWOULDBLOCK have the same value. Commit d2a1dc744b10 ("tap: Restructure in tap_pasta_input()") added a check for EWOULDBLOCK on purpose: > - Check for EWOULDBLOCK as well as EAGAIN for the benefit of any future > ports where those might not have the same value However, the condition uses && instead of ||, so it can never be true on a platform where EAGAIN and EWOULDBLOCK are different. Use || instead so that the check works as intended on such platforms. Fixes: d2a1dc744b10 ("tap: Restructure in tap_pasta_input()") Signed-off-by: Hayato Kiwata <dev@haytok.jp> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--tap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tap.c b/tap.c
index d418961..cf87591 100644
--- a/tap.c
+++ b/tap.c
@@ -1329,7 +1329,7 @@ static void tap_pasta_input(struct ctx *c, const struct timespec *now)
continue;
}
- if (errno == EAGAIN && errno == EWOULDBLOCK)
+ if (errno == EAGAIN || errno == EWOULDBLOCK)
break; /* all done for now */
die("Error on tap device, exiting");