tcp: Check errno on sendmmsg() failure, not just the return value

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-09-14 16:46:57 +02:00
parent 2c009e8e6f
commit c162f1e801

2
tcp.c
View file

@ -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)