diff --git a/backport-fix-clockdiff-is-server-down.patch b/backport-fix-clockdiff-is-server-down.patch new file mode 100644 index 0000000000000000000000000000000000000000..e0129686dfabecad8deef31c5d3db4fa8fc2f04d --- /dev/null +++ b/backport-fix-clockdiff-is-server-down.patch @@ -0,0 +1,42 @@ +From 34b9bc30b24ea0557772c7c9153ab5065db762ea Mon Sep 17 00:00:00 2001 +From: root +Date: Mon, 27 Dec 2021 20:27:43 +0800 +Subject: [PATCH] fix clockdiff is server down + +--- + clockdiff.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/clockdiff.c b/clockdiff.c +index 7836658..7fbb9dc 100644 +--- a/clockdiff.c ++++ b/clockdiff.c +@@ -322,7 +322,7 @@ static int measure_inner_loop(struct run_state *ctl, struct measure_vars *mv) + if (diff < RANGE) { + mv->min1 = delta1; + mv->min2 = delta2; +- return BREAK; ++ return GOOD; + } + } + return CONTINUE; +@@ -416,6 +416,8 @@ static int measure(struct run_state *ctl) + case BREAK: + escape = 1; + break; ++ case GOOD: ++ goto good_exit; + case CONTINUE: + continue; + default: +@@ -423,6 +425,7 @@ static int measure(struct run_state *ctl) + } + } + } ++good_exit: + ctl->measure_delta = (mv.min1 - mv.min2) / 2 + PROCESSING_TIME; + return GOOD; + } +-- +2.27.0 + diff --git a/iputils.spec b/iputils.spec index d5d94b793eb2b6cf0c7afebeff22f2026d9d257c..0d618f5221183a2c4ef35bc74b31d1fb150cfb5b 100644 --- a/iputils.spec +++ b/iputils.spec @@ -1,6 +1,6 @@ Name: iputils Version: 20190709 -Release: 7 +Release: 8 Summary: Network monitoring tools including ping License: BSD and GPLv2+ URL: https://github.com/iputils/iputils @@ -22,6 +22,7 @@ Patch6003: bugfix-rdisc-remove-PrivateUsers=yes-from-systemd-service-file. Patch9000: bugfix-fix-ping-dead-loop.patch Patch9001: bugfix-arping-w-does-not-take-effect.patch Patch9002: bugfix-fix-update-problem.patch +Patch9003: backport-fix-clockdiff-is-server-down.patch BuildRequires: gcc meson libidn2-devel openssl-devel libcap-devel libxslt BuildRequires: docbook5-style-xsl systemd glibc-kernheaders gettext @@ -51,6 +52,7 @@ cp %{SOURCE4} %{SOURCE5} . %patch9000 -p1 %patch9001 -p1 %patch9002 -p1 +%patch9003 -p1 %build export CFLAGS="-fpie" @@ -105,6 +107,12 @@ install -cp ifenslave.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/ %{_mandir}/man8/*.8.gz %changelog +* Mon Dec 27 2021 liugang - 20190709-8 +- Type:bugfix +- Id:NA +- SUG:NA +- DESC:fix clockdiff is server down + * Mon May 17 2021 gaihuiying - 20190709-7 - Type:bugfix - Id:NA