aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-09-14 16:46:57 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-09-14 16:57:50 +0200
commitc162f1e80197f4801f89638db741cfe372c4f215 (patch)
tree0216a3a5323875789edd9fccff2a6c7fd8c4701a
parent2c009e8e6f844669451b822ea2ffca2ba721d949 (diff)
downloadpasst-c162f1e80197f4801f89638db741cfe372c4f215.tar
passt-c162f1e80197f4801f89638db741cfe372c4f215.tar.gz
passt-c162f1e80197f4801f89638db741cfe372c4f215.tar.bz2
passt-c162f1e80197f4801f89638db741cfe372c4f215.tar.lz
passt-c162f1e80197f4801f89638db741cfe372c4f215.tar.xz
passt-c162f1e80197f4801f89638db741cfe372c4f215.tar.zst
passt-c162f1e80197f4801f89638db741cfe372c4f215.zip
tcp: Check errno on sendmmsg() failure, not just the return value
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tcp.c b/tcp.c
index 68437f2..baf3c08 100644
--- a/tcp.c
+++ b/tcp.c
@@ -1885,7 +1885,7 @@ recvmmsg:
sendmmsg:
ret = sendmmsg(c->fd_tap, tcp_l2_mh_tap, mh - tcp_l2_mh_tap,
MSG_NOSIGNAL | MSG_DONTWAIT);
- if (ret < 0 && ret == EINTR)
+ if (ret < 0 && errno == EINTR)
goto sendmmsg;
if (ret <= 0)