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
1 changed files with 1 additions and 1 deletions
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 a new issue