From 262a9fe184cfc5d9387f42f35163984206c6f223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Vok=C3=A1l?= Date: Fri, 12 Aug 2005 10:08:18 +0000 Subject: [PATCH] - fixed arping timeout (#165715) --- iputils-20020927-12-arping.patch | 25 +++++++++++++++++++++++++ iputils.spec | 7 ++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 iputils-20020927-12-arping.patch diff --git a/iputils-20020927-12-arping.patch b/iputils-20020927-12-arping.patch new file mode 100644 index 0000000..e6367fa --- /dev/null +++ b/iputils-20020927-12-arping.patch @@ -0,0 +1,25 @@ +--- iputils/arping.c.orig 2001-10-05 18:42:47.000000000 -0400 ++++ iputils/arping.c 2005-07-13 13:07:45.406217716 -0400 +@@ -166,10 +166,12 @@ void catcher(void) + if (start.tv_sec==0) + start = tv; + +- if (count-- == 0 || (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500)) ++ if ((timeout && MS_TDIFF(tv,start) > timeout*1000 + 500) || ++ ((count == 0) && (!timeout))) + finish(); + + if (last.tv_sec==0 || MS_TDIFF(tv,last) > 500) { ++ count--; + send_pack(s, src, dst, &me, &he); + if (count == 0 && unsolicited) + finish(); +@@ -510,6 +512,8 @@ main(int argc, char **argv) + sigaddset(&sset, SIGINT); + sigprocmask(SIG_BLOCK, &sset, &osset); + recv_pack(packet, cc, &from); ++ if(received == count) ++ exit(0); + sigprocmask(SIG_SETMASK, &osset, NULL); + } + } diff --git a/iputils.spec b/iputils.spec index a4463dc..874ae29 100644 --- a/iputils.spec +++ b/iputils.spec @@ -1,7 +1,7 @@ Summary: Network monitoring tools including ping. Name: iputils Version: 20020927 -Release: 24 +Release: 25 License: BSD Group: System Environment/Daemons Source0: http://www.tux.org/pub/net/ip-routing/%{name}-ss020927.tar.gz @@ -23,6 +23,7 @@ Patch11: iputils-retvals.patch #Patch12: iputils-arping.patch Patch13: iputils-20020927-ia64_align.patch Patch14: iputils-arping_buf_overflow.patch +Patch15: iputils-20020927-12-arping.patch Prefix: %{_prefix} BuildRoot: %{_tmppath}/%{name}-root BuildPreReq: docbook-utils perl-SGMLSpm @@ -54,6 +55,7 @@ cp %{SOURCE2} . #%patch12 -b .arping %patch13 -p1 -b .align %patch14 -p1 -b .buf_overflow +%patch15 -p1 -b .timeout %build %ifarch s390 s390x @@ -150,6 +152,9 @@ rm -rf ${RPM_BUILD_ROOT} %config(noreplace) %{_sysconfdir}/rc.d/init.d/rdisc %changelog +* Fri Aug 12 2005 Radek Vokal 20020927-25 +- fixed arping timeout (#165715) + * Mon Jul 18 2005 Radek Vokal 20020927-24 - fixed arping buffer overflow (#163383)