From 3505ca2e36b4d3ac32e78346fa118b661c9f2313 Mon Sep 17 00:00:00 2001 From: Pavel Cahyna Date: Mon, 7 Feb 2022 18:23:55 +0100 Subject: [PATCH] Apply changes from RHEL 8 2/3 Disable retry of pre-session "Get cipher suites" (#1831158) Resolves: rhbz#2051621 --- 0014-lanplus-cipher-retry.patch | 38 +++++++++++++++++++++++++++++++++ ipmitool.spec | 1 + 2 files changed, 39 insertions(+) create mode 100644 0014-lanplus-cipher-retry.patch diff --git a/0014-lanplus-cipher-retry.patch b/0014-lanplus-cipher-retry.patch new file mode 100644 index 0000000..9aa3437 --- /dev/null +++ b/0014-lanplus-cipher-retry.patch @@ -0,0 +1,38 @@ +From 9d72def87ecc384d0a46525c766e755068fefe54 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=A1clav=20Dole=C5=BEal?= +Date: Thu, 28 May 2020 13:32:31 +0200 +Subject: [PATCH] lanplus: don't retry pre-session Get cipher suites +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Some BMCs are ignoring it, causing needless delay. + +Signed-off-by: Václav Doležal +--- + src/plugins/lanplus/lanplus.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/plugins/lanplus/lanplus.c b/src/plugins/lanplus/lanplus.c +index 3087348..c442c0e 100644 +--- a/src/plugins/lanplus/lanplus.c ++++ b/src/plugins/lanplus/lanplus.c +@@ -3459,9 +3459,13 @@ ipmi_find_best_cipher_suite(struct ipmi_intf *intf) + }; + const size_t nr_preferred = ARRAY_SIZE(cipher_order_preferred); + size_t ipref, i; ++ int rc; ++ int retry_old = intf->ssn_params.retry; + +- if (ipmi_get_channel_cipher_suites(intf, "ipmi", IPMI_LAN_CHANNEL_E, +- suites, &nr_suites) < 0) ++ ipmi_intf_session_set_retry(intf, 1); ++ rc = ipmi_get_channel_cipher_suites(intf, "ipmi", IPMI_LAN_CHANNEL_E, suites, &nr_suites); ++ ipmi_intf_session_set_retry(intf, retry_old); ++ if (rc < 0) + { + /* default legacy behavior - cipher suite 3 if none is requested */ + return IPMI_LANPLUS_CIPHER_SUITE_3; +-- +2.25.4 + diff --git a/ipmitool.spec b/ipmitool.spec index 7dea09a..b40b369 100644 --- a/ipmitool.spec +++ b/ipmitool.spec @@ -29,6 +29,7 @@ Patch10: 0010-pef-missing-newline.patch Patch11: 0011-expand-sensor-name-column.patch Patch12: 0012-CVE-2020-5208.patch Patch13: 0013-quanta-oem-support.patch +Patch14: 0014-lanplus-cipher-retry.patch BuildRequires: openssl-devel readline-devel ncurses-devel %{?systemd_requires}