Thomas Renninger
e0a3d92e58
- Fixes (bsc#1179133) lanplus: hanging on getting cipher suites for 10 seconds A lanplus-don-t-retry-pre-session-Get-cipher-suites.patch OBS-URL: https://build.opensuse.org/request/show/868914 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/ipmitool?expand=0&rev=55
36 lines
1.3 KiB
Diff
36 lines
1.3 KiB
Diff
From: Václav Doležal <vdolezal@redhat.com>
|
|
Subject: lanplus: don't retry pre-session Get cipher suites
|
|
References: bsc#1179133
|
|
Patch-Mainline:
|
|
Git-commit: 0de01deddb0aca475b3929c372ca2448d6858a89
|
|
Git-repo: https://github.com/yontalcar/ipmitool.git.git
|
|
|
|
Some BMCs are ignoring it, causing needless delay.
|
|
|
|
Addresses: https://github.com/ipmitool/ipmitool/issues/199
|
|
|
|
Signed-off-by: Václav Doležal <vdolezal@redhat.com>
|
|
|
|
|
|
Signed-off-by: <trenn@suse.com>
|
|
diff --git a/src/plugins/lanplus/lanplus.c b/src/plugins/lanplus/lanplus.c
|
|
index f5aba5e..06b29a0 100644
|
|
--- a/src/plugins/lanplus/lanplus.c
|
|
+++ b/src/plugins/lanplus/lanplus.c
|
|
@@ -3390,9 +3390,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 - fall back to cipher suite 3 */
|
|
return IPMI_LANPLUS_CIPHER_SUITE_3;
|