[patch tracking] 20201129205849773219 - 2583fb77dd
This commit is contained in:
parent
79ec42ff4f
commit
53a8c5c4cd
34
2583fb77dd57c5183998177a3fa13a680b573005.patch
Normal file
34
2583fb77dd57c5183998177a3fa13a680b573005.patch
Normal file
@ -0,0 +1,34 @@
|
||||
diff --git a/ping/ping.c b/ping/ping.c
|
||||
index e277697..d96298e 100644
|
||||
--- a/ping/ping.c
|
||||
+++ b/ping/ping.c
|
||||
@@ -1314,8 +1314,11 @@ int ping4_receive_error_msg(struct ping_rts *rts, socket_st *sock)
|
||||
msg.msg_controllen = sizeof(cbuf);
|
||||
|
||||
res = recvmsg(sock->fd, &msg, MSG_ERRQUEUE | MSG_DONTWAIT);
|
||||
- if (res < 0)
|
||||
+ if (res < 0) {
|
||||
+ if (errno == EAGAIN || errno == EINTR)
|
||||
+ local_errors++;
|
||||
goto out;
|
||||
+ }
|
||||
|
||||
e = NULL;
|
||||
for (cmsgh = CMSG_FIRSTHDR(&msg); cmsgh; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) {
|
||||
diff --git a/ping/ping6_common.c b/ping/ping6_common.c
|
||||
index 279c533..459f63e 100644
|
||||
--- a/ping/ping6_common.c
|
||||
+++ b/ping/ping6_common.c
|
||||
@@ -481,8 +481,11 @@ int ping6_receive_error_msg(struct ping_rts *rts, socket_st *sock)
|
||||
msg.msg_controllen = sizeof(cbuf);
|
||||
|
||||
res = recvmsg(sock->fd, &msg, MSG_ERRQUEUE | MSG_DONTWAIT);
|
||||
- if (res < 0)
|
||||
+ if (res < 0) {
|
||||
+ if (errno == EAGAIN || errno == EINTR)
|
||||
+ local_errors++;
|
||||
goto out;
|
||||
+ }
|
||||
|
||||
e = NULL;
|
||||
for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
|
||||
Loading…
x
Reference in New Issue
Block a user