summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2016-12-10 00:12:06 +0300
committerAdriana Kobylak <anoo@us.ibm.com>2016-12-13 18:59:06 +0300
commitcde67655ac534dbd76d4bae4768ed510a0d14a03 (patch)
treee4032b8d9c437d38028fcb3cd3594f196ac0c33b
parentd159c7d5d4a93b4c6ec4c628add1a4d99fb49a87 (diff)
downloadopenbmc-v1.0-stable.tar.xz
ipmi: v1.0-stable: Patch for Get BT Interface Capabilitiesv1.0-stable
Fix the response data. Fixes: openbmc/openbmc#847 Change-Id: I16bfefbccc7bea5526cacf85202b1c84bbe7f750 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
-rw-r--r--meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid.bb1
-rw-r--r--meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid/0001_get_bt_interface_capabilities.patch34
2 files changed, 35 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid.bb b/meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid.bb
index a891df6bf5..44e5dfceea 100644
--- a/meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid.bb
+++ b/meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid.bb
@@ -18,6 +18,7 @@ RDEPENDS_${PN} += "clear-once"
RDEPENDS_${PN} += "settings"
RDEPENDS_${PN} += "network"
SRC_URI += "git://github.com/openbmc/phosphor-host-ipmid"
+SRC_URI += "file://0001_get_bt_interface_capabilities.patch"
SRCREV = "87e080b537aff3fd22ec56ef72660937bed38422"
diff --git a/meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid/0001_get_bt_interface_capabilities.patch b/meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid/0001_get_bt_interface_capabilities.patch
new file mode 100644
index 0000000000..e59c67724c
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid/0001_get_bt_interface_capabilities.patch
@@ -0,0 +1,34 @@
+From 1b1c88afb14241505a54436fbc75946272f4d291 Mon Sep 17 00:00:00 2001
+From: Adriana Kobylak <anoo@us.ibm.com>
+Date: Fri, 9 Dec 2016 14:00:13 -0600
+Subject: [PATCH] ipmid: Fix Get BT Interface Capabilities response
+
+Per the IPMI 2.0 spec, the input and output buffer size
+must be maximum buffer size minus one byte to allocate
+space for the length byte.
+
+Fixes: openbmc/openbmc#847
+
+Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
+---
+ apphandler.C | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/apphandler.C b/apphandler.C
+index b8cc0aa..e1c67f0 100644
+--- a/apphandler.C
++++ b/apphandler.C
+@@ -300,7 +300,9 @@ ipmi_ret_t ipmi_app_get_bt_capabilities(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ // Status code.
+ ipmi_ret_t rc = IPMI_CC_OK;
+
+- uint8_t str[] = {0x01, MAX_IPMI_BUFFER, MAX_IPMI_BUFFER, 0x0A, 0x01};
++ // Per IPMI 2.0 spec, the input and output buffer size must be the max
++ // buffer size minus one byte to allocate space for the length byte.
++ uint8_t str[] = {0x01, MAX_IPMI_BUFFER-1, MAX_IPMI_BUFFER-1, 0x0A, 0x01};
+
+ // Data length
+ *data_len = sizeof(str);
+--
+1.8.2.2
+