From e89f52c22663caa61b9bb4c666704c082055bb96 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Dec 16 2020 16:35:45 +0000 Subject: import iputils-20180629-6.el8 --- diff --git a/SOURCES/ping-add-support-for-sub-second-timeouts.patch b/SOURCES/ping-add-support-for-sub-second-timeouts.patch index d5ee6b1..f35bf59 100644 --- a/SOURCES/ping-add-support-for-sub-second-timeouts.patch +++ b/SOURCES/ping-add-support-for-sub-second-timeouts.patch @@ -1,4 +1,4 @@ -From 1308c7679307e80e638bccce2a6e5eb721fa9d27 Mon Sep 17 00:00:00 2001 +From 9633d828e8166e47af733cbc6563ac93e5e06a30 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Wed, 9 Dec 2020 10:23:09 +0100 Subject: [PATCH] ping: add support for sub-second timeouts @@ -17,11 +17,11 @@ Backported from upstream PATCH: 918e824dc13a39e4d68fcd82fd2d248c9fba6bbd Claudius Zingerli 93dfb95d48977d151dbe94983e4998959e748aee Rosen Penev --- - ping.c | 91 ++++++++++++++++++++++++++++++++++++++-------------------- - 1 file changed, 60 insertions(+), 31 deletions(-) + ping.c | 89 ++++++++++++++++++++++++++++++++++++++-------------------- + 1 file changed, 58 insertions(+), 31 deletions(-) diff --git a/ping.c b/ping.c -index d9a3f5d..fec2453 100644 +index d9a3f5d..33f7d45 100644 --- a/ping.c +++ b/ping.c @@ -57,6 +57,7 @@ @@ -32,7 +32,7 @@ index d9a3f5d..fec2453 100644 #ifndef ICMP_FILTER #define ICMP_FILTER 1 -@@ -192,6 +193,40 @@ static void set_socket_option(socket_st *sock, int level, int optname, const voi +@@ -192,6 +193,38 @@ static void set_socket_option(socket_st *sock, int level, int optname, const voi } } @@ -64,16 +64,14 @@ index d9a3f5d..fec2453 100644 + } + return num; +err: -+ if (errno == ERANGE) -+ error(2, errno, "%s: %s", err_msg, str); -+ error(2, 0, "%s: %s", err_msg, str); -+ return num; ++ fprintf(stderr, "%s: %s", err_msg, str); ++ exit(2); +} + int main(int argc, char **argv) { -@@ -298,30 +333,19 @@ main(int argc, char **argv) +@@ -298,30 +331,19 @@ main(int argc, char **argv) options |= F_PTIMEOFDAY; break; case 'i': @@ -117,7 +115,7 @@ index d9a3f5d..fec2453 100644 case 'I': /* IPv6 */ if (strchr(optarg, ':')) { -@@ -460,13 +484,18 @@ main(int argc, char **argv) +@@ -460,13 +482,18 @@ main(int argc, char **argv) } break; case 'W': @@ -144,5 +142,5 @@ index d9a3f5d..fec2453 100644 usage(); break; -- -2.28.0 +2.29.2 diff --git a/SPECS/iputils.spec b/SPECS/iputils.spec index 43e74f7..ce15cf3 100644 --- a/SPECS/iputils.spec +++ b/SPECS/iputils.spec @@ -3,7 +3,7 @@ Summary: Network monitoring tools including ping Name: iputils Version: 20180629 -Release: 4%{?dist} +Release: 6%{?dist} # some parts are under the original BSD (ping.c) # some are under GPLv2+ (tracepath.c) License: BSD and GPLv2+ @@ -169,6 +169,12 @@ install -m 644 %SOURCE3 ${RPM_BUILD_ROOT}/%{_unitdir} %endif %changelog +* Tue Dec 15 2020 Jan Macku - 20180629-6 +- Exit on error (#1852638) + +* Thu Dec 10 2020 Jan Macku - 20180629-5 +- Change error() -> fprintf() reported by covscan (#1852638) + * Wed Dec 09 2020 Jan Macku - 20180629-4 - Fix infinite loop caused by subsecond timeouts (#1852638)