From c162f1e80197f4801f89638db741cfe372c4f215 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Tue, 14 Sep 2021 16:46:57 +0200 Subject: tcp: Check errno on sendmmsg() failure, not just the return value Signed-off-by: Stefano Brivio --- tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tcp.c') 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) -- cgit v1.2.3