Blame SOURCES/0012-lanplus-cipher-retry.patch

c35241
From 9d72def87ecc384d0a46525c766e755068fefe54 Mon Sep 17 00:00:00 2001
c35241
From: =?UTF-8?q?V=C3=A1clav=20Dole=C5=BEal?= <vdolezal@redhat.com>
c35241
Date: Thu, 28 May 2020 13:32:31 +0200
c35241
Subject: [PATCH] lanplus: don't retry pre-session Get cipher suites
c35241
MIME-Version: 1.0
c35241
Content-Type: text/plain; charset=UTF-8
c35241
Content-Transfer-Encoding: 8bit
c35241
c35241
Some BMCs are ignoring it, causing needless delay.
c35241
c35241
Signed-off-by: Václav Doležal <vdolezal@redhat.com>
c35241
---
c35241
 src/plugins/lanplus/lanplus.c | 8 ++++++--
c35241
 1 file changed, 6 insertions(+), 2 deletions(-)
c35241
c35241
diff --git a/src/plugins/lanplus/lanplus.c b/src/plugins/lanplus/lanplus.c
c35241
index 3087348..c442c0e 100644
c35241
--- a/src/plugins/lanplus/lanplus.c
c35241
+++ b/src/plugins/lanplus/lanplus.c
c35241
@@ -3459,9 +3459,13 @@ ipmi_find_best_cipher_suite(struct ipmi_intf *intf)
c35241
 	};
c35241
 	const size_t nr_preferred = ARRAY_SIZE(cipher_order_preferred);
c35241
 	size_t ipref, i;
c35241
+	int rc;
c35241
+	int retry_old = intf->ssn_params.retry;
c35241
 
c35241
-	if (ipmi_get_channel_cipher_suites(intf, "ipmi", IPMI_LAN_CHANNEL_E,
c35241
-	                                   suites, &nr_suites) < 0)
c35241
+	ipmi_intf_session_set_retry(intf, 1);
c35241
+	rc = ipmi_get_channel_cipher_suites(intf, "ipmi", IPMI_LAN_CHANNEL_E, suites, &nr_suites);
c35241
+	ipmi_intf_session_set_retry(intf, retry_old);
c35241
+	if (rc < 0)
c35241
 	{
c35241
 		/* default legacy behavior - cipher suite 3 if none is requested */
c35241
 		return IPMI_LANPLUS_CIPHER_SUITE_3;
c35241
-- 
c35241
2.25.4
c35241