revert process interrupts in ping*_receive_error_msg
(cherry picked from commit b5c10585558ff273c505454dbceddebba40b0625)
This commit is contained in:
parent
de0e4b31de
commit
2297aa8d15
@ -1,6 +1,6 @@
|
||||
Name: iputils
|
||||
Version: 20210722
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: Network monitoring tools including ping
|
||||
License: BSD and GPLv2+
|
||||
URL: https://github.com/iputils/iputils
|
||||
@ -16,6 +16,7 @@ Patch0000: iputils-ifenslave.patch
|
||||
Patch0001: iputils-ifenslave-CWE-170.patch
|
||||
Patch0002: backport-arping-exit-0-if-running-in-deadline-mode-and-we-see-replies.patch
|
||||
Patch0003: backport-arping-fix-typo-in-error-checking.patch
|
||||
Patch0004: revert-process-interrupts-in-ping-_receive_error_msg.patch
|
||||
|
||||
BuildRequires: gcc meson libidn2-devel openssl-devel libcap-devel libxslt
|
||||
BuildRequires: docbook5-style-xsl systemd iproute glibc-kernheaders gettext
|
||||
@ -114,6 +115,12 @@ install -cp ifenslave.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/
|
||||
%{_unitdir}/ninfod.service
|
||||
|
||||
%changelog
|
||||
* Sat Mar 05 2022 eaglegai <eaglegai@163.com> - 20210722-3
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:revert process interrupts in ping*_receive_error_msg
|
||||
|
||||
* Fri Feb 18 2021 xinghe <xinghe2@h-partners.com> - 20210722-2
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
46
revert-process-interrupts-in-ping-_receive_error_msg.patch
Normal file
46
revert-process-interrupts-in-ping-_receive_error_msg.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From 6b94c384b8f5337fff2f3c3145d0239ff91618cd Mon Sep 17 00:00:00 2001
|
||||
From: eaglegai <eaglegai@163.com>
|
||||
Date: Sat, 5 Mar 2022 09:37:47 +0800
|
||||
Subject: [PATCH] revert process interrupts in ping*_receive_error_msg
|
||||
|
||||
---
|
||||
ping/ping.c | 5 +----
|
||||
ping/ping6_common.c | 5 +----
|
||||
2 files changed, 2 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/ping/ping.c b/ping/ping.c
|
||||
index 6fcb44f..7ec4836 100644
|
||||
--- a/ping/ping.c
|
||||
+++ b/ping/ping.c
|
||||
@@ -1314,11 +1314,8 @@ 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 (errno == EAGAIN || errno == EINTR)
|
||||
- local_errors++;
|
||||
+ if (res < 0)
|
||||
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 986210b..b0aa66b 100644
|
||||
--- a/ping/ping6_common.c
|
||||
+++ b/ping/ping6_common.c
|
||||
@@ -482,11 +482,8 @@ 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 (errno == EAGAIN || errno == EINTR)
|
||||
- local_errors++;
|
||||
+ if (res < 0)
|
||||
goto out;
|
||||
- }
|
||||
|
||||
e = NULL;
|
||||
for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
|
||||
--
|
||||
2.33.0
|
||||
Loading…
x
Reference in New Issue
Block a user