From 7d7b4013fd904d6837e3a4b0f6b6639d8dc9666f Mon Sep 17 00:00:00 2001 From: Pavel Cahyna Date: Thu, 4 Dec 2025 18:36:45 +0100 Subject: [PATCH] Apply fix for ipmitool lan print Upstream change: https://codeberg.org/IPMITool/ipmitool/commit/137aeb64cbb493d61d6945cac156aba5f0510780 Debian patch: https://sources.debian.org/patches/ipmitool/1.8.19-10/0801-fix-lan-print-fails-on-unsupported-parameters.patch/ Same fix developed and tested by rmetrich. Resolves: RHEL-126841 --- ...rint-fails-on-unsupported-parameters.patch | 39 +++++++++++++++++++ ipmitool.spec | 3 ++ 2 files changed, 42 insertions(+) create mode 100644 0025-fix-lan-print-fails-on-unsupported-parameters.patch diff --git a/0025-fix-lan-print-fails-on-unsupported-parameters.patch b/0025-fix-lan-print-fails-on-unsupported-parameters.patch new file mode 100644 index 0000000..d38ccff --- /dev/null +++ b/0025-fix-lan-print-fails-on-unsupported-parameters.patch @@ -0,0 +1,39 @@ +From 137aeb64cbb493d61d6945cac156aba5f0510780 Mon Sep 17 00:00:00 2001 +From: Miao Wang +Date: Sat, 10 Feb 2024 12:51:15 +0800 +Subject: [PATCH] lan: fix lan print fails on unsupported parameters + +After upgrading to ipmitool 1.8.19, ipmitool lan print can only print out +`Set in Progress` and other parameters are missing on our servers. After +bisecting, commit: + + 351dad24a26f lan: Add processing of get/set specific CCs + +is identified to be the source of the problem, where the function +get_lan_param_select is expected to consider severial error codes it +receives as empty response. It then constructs an empty response in `p` +and assigns `p` to `rc` and the control flow falls through to the +default case, which prints the error code in verbose mode and should +return `rc` instead of `NULL`. + +Signed-off-by: Miao Wang +Forwarded: not-needed +Applied-Upstream: https://codeberg.org/IPMITool/ipmitool/commit/137aeb64cbb493d61d6945cac156aba5f0510780 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061770 +--- + lib/ipmi_lanp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/ipmi_lanp.c b/lib/ipmi_lanp.c +index fe0046f..26e7365 100644 +--- a/lib/ipmi_lanp.c ++++ b/lib/ipmi_lanp.c +@@ -245,7 +245,7 @@ get_lan_param_select(struct ipmi_intf *intf, uint8_t chan, int param, int select + specific_val2str(rsp->ccode, + get_lan_cc_vals, + completion_code_vals)); +- return NULL; ++ return rc; + } + + p->data = rsp->data + 1; diff --git a/ipmitool.spec b/ipmitool.spec index c273ae8..c7b6281 100644 --- a/ipmitool.spec +++ b/ipmitool.spec @@ -25,6 +25,9 @@ Patch7: 0007-check-input.patch # https://github.com/ipmitool/ipmitool/issues/199 # https://github.com/ipmitool/ipmitool/pull/214 - approved but not merged Patch14: 0014-lanplus-cipher-retry.patch +# https://codeberg.org/IPMITool/ipmitool/commit/137aeb64cbb493d61d6945cac156aba5f0510780 +# taken from Debian: https://sources.debian.org/patches/ipmitool/1.8.19-10/0801-fix-lan-print-fails-on-unsupported-parameters.patch/ +Patch25: 0025-fix-lan-print-fails-on-unsupported-parameters.patch # Debian patches, never applied upstream # https://bugs.launchpad.net/ubuntu/+source/ipmitool/+bug/633054