diff --git a/backport-tracepath-Merge-if-clauses.patch b/backport-tracepath-Merge-if-clauses.patch new file mode 100644 index 0000000000000000000000000000000000000000..ee28cb46fdbc3e58d3588795a57e6baa1c4d20dc --- /dev/null +++ b/backport-tracepath-Merge-if-clauses.patch @@ -0,0 +1,41 @@ +From 608c62b3967882d31ff9edde97e38de0fcff154b Mon Sep 17 00:00:00 2001 +From: Petr Vorel +Date: Wed, 24 May 2023 10:40:23 +0200 +Subject: [PATCH 018/135] tracepath: Merge if clauses +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Merge if clauses, because the printed message is the same. +This should have been done in 3337034 ("Initial import of iputils"), +but 2ca0f7d made it even worse when remove else from else if +(clang-tidy was obviously wrong :)). + +Fixes: 2ca0f7d ("[clang-tidy] fix identical branches") +Reviewed-by: Marek Küthe +Signed-off-by: Petr Vorel +Reference: https://github.com/iputils/iputils/commit/608c62b3967882d31ff9edde97e38de0fcff154b +--- + tracepath.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/tracepath.c b/tracepath.c +index ebb7f72..04d77b8 100644 +--- a/tracepath.c ++++ b/tracepath.c +@@ -321,10 +321,8 @@ static int recverr(struct run_state *const ctl) + e->ee_type == ICMPV6_TIME_EXCEED && + e->ee_code == ICMPV6_EXC_HOPLIMIT)) { + if (rethops >= 0) { +- if (sndhops >= 0 && rethops != sndhops) +- printf(_("asymm %2d "), rethops); +- +- if (sndhops < 0 && rethops != ctl->ttl) ++ if ((sndhops >= 0 && rethops != sndhops) || ++ (sndhops < 0 && rethops != ctl->ttl)) + printf(_("asymm %2d "), rethops); + } + printf("\n"); +-- +2.33.0 + diff --git a/iputils.spec b/iputils.spec index 194408f607bffe7c75953666911ecc3d65968727..7c1c3a4fb7a4da00fda472a2babecbb6d39ab275 100644 --- a/iputils.spec +++ b/iputils.spec @@ -1,6 +1,6 @@ Name: iputils Version: 20221126 -Release: 4 +Release: 5 Summary: Network monitoring tools including ping License: BSD and GPLv2+ URL: https://github.com/iputils/iputils @@ -19,6 +19,8 @@ Patch0010: arping-Fix-exit-code-on-w-option.patch Patch6000: backport-clockdiff-Set-ppoll-timeout-minimum-to-1ms.patch Patch6001: backport-ping-fix-overflow-on-negative.patch Patch6002: backport-tracepath-Restore-the-MTU-probing-behavior.patch +# reference https://github.com/iputils/iputils/commit/608c62b3967882d31ff9edde97e38de0fcff154b +Patch6003: backport-tracepath-Merge-if-clauses.patch BuildRequires: gcc meson libidn2-devel openssl-devel libcap-devel libxslt BuildRequires: docbook5-style-xsl systemd iproute glibc-kernheaders gettext @@ -89,6 +91,12 @@ install -cp ifenslave.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/ %{_mandir}/man8/*.8.gz %changelog +* Thu May 16 2024 xiaozai - 20221126-5 +- Type:NA +- ID:NA +- SUG:NA +- DESC:tracepath: Merge if clauses, backport a patch + * Mon Apr 1 2024 zhongxuan - 20221126-4 - Type:bugfix - ID:NA