[iputils/f20] Fix message flood when EPERM is encountered in ping (#1061867)

jsynacek jsynacek at fedoraproject.org
Wed Mar 26 10:08:19 UTC 2014


commit a812abf378400ef320b0ec16beabbc9138087771
Author: Jan Synacek <jsynacek at redhat.com>
Date:   Wed Mar 26 11:05:57 2014 +0100

    Fix message flood when EPERM is encountered in ping (#1061867)

 iputils-20121221-eperm-flood.patch |   26 ++++++++++++++++++++++++++
 iputils.spec                       |    7 ++++++-
 2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/iputils-20121221-eperm-flood.patch b/iputils-20121221-eperm-flood.patch
new file mode 100644
index 0000000..97641c2
--- /dev/null
+++ b/iputils-20121221-eperm-flood.patch
@@ -0,0 +1,26 @@
+--- iputils-s20121221/ping_common.c	2014-03-26 10:41:49.905136743 +0100
++++ iputils-s20121221-new/ping_common.c	2014-03-26 10:57:38.259918104 +0100
+@@ -525,10 +525,11 @@ resend:
+ 	if (i > 0) {
+ 		/* Apparently, it is some fatal bug. */
+ 		abort();
+-	} else if (errno == ENOBUFS || errno == ENOMEM) {
++	} else if (errno == ENOBUFS || errno == ENOMEM || errno == EPERM) {
+ 		int nores_interval;
+ 
+-		/* Device queue overflow or OOM. Packet is not sent. */
++		/* Device queue overflow, OOM or operation not permitted.
++		 * Packet is not sent. */
+ 		tokens = 0;
+ 		/* Slowdown. This works only in adaptive mode (option -A) */
+ 		rtt_addend += (rtt < 8*50000 ? rtt/8 : 50000);
+@@ -537,7 +538,8 @@ resend:
+ 		nores_interval = SCHINT(interval/2);
+ 		if (nores_interval > 500)
+ 			nores_interval = 500;
+-		oom_count++;
++		if (errno != EPERM)
++			oom_count++;
+ 		if (oom_count*nores_interval < lingertime)
+ 			return nores_interval;
+ 		i = 0;
diff --git a/iputils.spec b/iputils.spec
index 612e9b8..5e7b415 100644
--- a/iputils.spec
+++ b/iputils.spec
@@ -3,7 +3,7 @@
 Summary: Network monitoring tools including ping
 Name: iputils
 Version: 20121221
-Release: 4%{?dist}
+Release: 5%{?dist}
 # some parts are under the original BSD (ping.c)
 # some are under GPLv2+ (tracepath.c)
 License: BSD and GPLv2+
@@ -20,6 +20,7 @@ Source6: ninfod.service
 Patch0: iputils-20020927-rh.patch
 Patch1: iputils-ifenslave.patch
 Patch2: iputils-20121221-floodlocale.patch
+Patch3: iputils-20121221-eperm-flood.patch
 
 BuildRequires: docbook-utils perl-SGMLSpm
 BuildRequires: glibc-kernheaders >= 2.4-8.19
@@ -70,6 +71,7 @@ Queries.
 %patch0 -p1 -b .rh
 %patch1 -p1 -b .addr
 %patch2 -p1 -b .floc
+%patch3 -p1 -b .eperm
 
 %build
 %ifarch s390 s390x
@@ -177,6 +179,9 @@ mv -f RELNOTES.tmp RELNOTES
 %attr(644,root,root) %{_mandir}/man8/ninfod.8.gz
 
 %changelog
+* Wed Mar 26 2014 Jan Synáček <jsynacek at redhat.com> - 20121221-5
+- Fix message flood when EPERM is encountered in ping (#1061867)
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 20121221-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list