mirror of
https://passt.top/passt
synced 2024-07-05 09:15:48 +00:00
tcp: Check errno on sendmmsg() failure, not just the return value
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
2c009e8e6f
commit
c162f1e801
2
tcp.c
2
tcp.c
@ -1885,7 +1885,7 @@ recvmmsg:
|
|||||||
sendmmsg:
|
sendmmsg:
|
||||||
ret = sendmmsg(c->fd_tap, tcp_l2_mh_tap, mh - tcp_l2_mh_tap,
|
ret = sendmmsg(c->fd_tap, tcp_l2_mh_tap, mh - tcp_l2_mh_tap,
|
||||||
MSG_NOSIGNAL | MSG_DONTWAIT);
|
MSG_NOSIGNAL | MSG_DONTWAIT);
|
||||||
if (ret < 0 && ret == EINTR)
|
if (ret < 0 && errno == EINTR)
|
||||||
goto sendmmsg;
|
goto sendmmsg;
|
||||||
|
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user