From b5c10585558ff273c505454dbceddebba40b0625 Mon Sep 17 00:00:00 2001 From: eaglegai Date: Sat, 5 Mar 2022 15:15:23 +0800 Subject: [PATCH] revert process interrupts in ping*_receive_error_msg --- iputils.spec | 9 +++- ...nterrupts-in-ping-_receive_error_msg.patch | 46 +++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 revert-process-interrupts-in-ping-_receive_error_msg.patch diff --git a/iputils.spec b/iputils.spec index 70df2cc..015b0dc 100644 --- a/iputils.spec +++ b/iputils.spec @@ -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 - 20210722-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:revert process interrupts in ping*_receive_error_msg + * Fri Feb 18 2021 xinghe - 20210722-2 - Type:bugfix - ID:NA diff --git a/revert-process-interrupts-in-ping-_receive_error_msg.patch b/revert-process-interrupts-in-ping-_receive_error_msg.patch new file mode 100644 index 0000000..3c36be8 --- /dev/null +++ b/revert-process-interrupts-in-ping-_receive_error_msg.patch @@ -0,0 +1,46 @@ +From 6b94c384b8f5337fff2f3c3145d0239ff91618cd Mon Sep 17 00:00:00 2001 +From: eaglegai +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 \ No newline at end of file -- Gitee