!68 [sync] PR-67: fix clockdiff host is down
From: @openeuler-sync-bot Reviewed-by: @gebidelidaye Signed-off-by: @gebidelidaye
This commit is contained in:
commit
487895e106
27
backport-clockdiff-Set-ppoll-timeout-minimum-to-1ms.patch
Normal file
27
backport-clockdiff-Set-ppoll-timeout-minimum-to-1ms.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From 471942dee341e5aae2a277ecd85c05e671752880 Mon Sep 17 00:00:00 2001
|
||||||
|
From: caibingcheng <jack_cbc@163.com>
|
||||||
|
Date: Mon, 24 Apr 2023 20:45:28 +0800
|
||||||
|
Subject: [PATCH] clockdiff: Set ppoll timeout minimum to 1ms
|
||||||
|
|
||||||
|
Fixes: https://github.com/iputils/iputils/issues/326
|
||||||
|
Closes: https://github.com/iputils/iputils/pull/459
|
||||||
|
Reviewed-by: Petr Vorel <pvorel@suse.cz>
|
||||||
|
Reviewed-by: Noah Meyerhans <noahm@debian.org>
|
||||||
|
Signed-off-by: caibingcheng <jack_cbc@163.com>
|
||||||
|
---
|
||||||
|
clockdiff.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/clockdiff.c b/clockdiff.c
|
||||||
|
index 5e639ab7..ccb5b5b3 100644
|
||||||
|
--- a/clockdiff.c
|
||||||
|
+++ b/clockdiff.c
|
||||||
|
@@ -210,7 +210,7 @@ static int measure_inner_loop(struct run_state *ctl, struct measure_vars *mv)
|
||||||
|
struct pollfd p = { .fd = ctl->sock_raw, .events = POLLIN | POLLHUP };
|
||||||
|
|
||||||
|
{
|
||||||
|
- long tmo = ctl->rtt + ctl->rtt_sigma;
|
||||||
|
+ long tmo = MAX(ctl->rtt + ctl->rtt_sigma, 1);
|
||||||
|
|
||||||
|
mv->tout.tv_sec = tmo / 1000;
|
||||||
|
mv->tout.tv_nsec = (tmo - (tmo / 1000) * 1000) * 1000000;
|
||||||
10
iputils.spec
10
iputils.spec
@ -1,6 +1,6 @@
|
|||||||
Name: iputils
|
Name: iputils
|
||||||
Version: 20221126
|
Version: 20221126
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Network monitoring tools including ping
|
Summary: Network monitoring tools including ping
|
||||||
License: BSD and GPLv2+
|
License: BSD and GPLv2+
|
||||||
URL: https://github.com/iputils/iputils
|
URL: https://github.com/iputils/iputils
|
||||||
@ -16,6 +16,8 @@ Patch0002: revert-process-interrupts-in-ping-_receive_error_msg.patch
|
|||||||
|
|
||||||
Patch0010: arping-Fix-exit-code-on-w-option.patch
|
Patch0010: arping-Fix-exit-code-on-w-option.patch
|
||||||
|
|
||||||
|
Patch6000: backport-clockdiff-Set-ppoll-timeout-minimum-to-1ms.patch
|
||||||
|
|
||||||
BuildRequires: gcc meson libidn2-devel openssl-devel libcap-devel libxslt
|
BuildRequires: gcc meson libidn2-devel openssl-devel libcap-devel libxslt
|
||||||
BuildRequires: docbook5-style-xsl systemd iproute glibc-kernheaders gettext
|
BuildRequires: docbook5-style-xsl systemd iproute glibc-kernheaders gettext
|
||||||
%{?systemd_ordering}
|
%{?systemd_ordering}
|
||||||
@ -86,6 +88,12 @@ install -cp ifenslave.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/
|
|||||||
%{_mandir}/man8/*.8.gz
|
%{_mandir}/man8/*.8.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat May 27 2023 zhongxuan <zhongxuan2@huawei.com> - 20221126-2
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: fix clockdiff host is down bug
|
||||||
|
|
||||||
* Wed Mar 08 2023 zhongxuan <zhongxuan2@huawei.com> - 20221126-1
|
* Wed Mar 08 2023 zhongxuan <zhongxuan2@huawei.com> - 20221126-1
|
||||||
- Type:requirements
|
- Type:requirements
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user