From e596563bac708602945d0f77b9d54a4242abecc1 Mon Sep 17 00:00:00 2001 From: Jan Synacek Date: Wed, 26 Mar 2014 11:05:57 +0100 Subject: [PATCH] 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 deletion(-) create mode 100644 iputils-20121221-eperm-flood.patch 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 6bd75f2..91afa99 100644 --- a/iputils.spec +++ b/iputils.spec @@ -3,7 +3,7 @@ Summary: Network monitoring tools including ping Name: iputils Version: 20121221 -Release: 8%{?dist} +Release: 9%{?dist} # some parts are under the original BSD (ping.c) # some are under GPLv2+ (tracepath.c) License: BSD and GPLv2+ @@ -18,6 +18,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 @@ -58,6 +59,7 @@ Queries. %patch0 -p1 -b .rh %patch1 -p1 -b .addr %patch2 -p1 -b .floc +%patch3 -p1 -b .eperm %build %ifarch s390 s390x @@ -158,6 +160,9 @@ mv -f RELNOTES.tmp RELNOTES %attr(644,root,root) %{_mandir}/man8/ninfod.8.gz %changelog +* Wed Mar 26 2014 Jan Synáček - 20121221-9 +- Fix message flood when EPERM is encountered in ping (#1061867) + * Mon Feb 3 2014 Jan Synáček - 20121221-8 - reference documentation in the service files - remove redundant sysconfig-related stuff