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

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